-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding new unseen molecules #11
Comments
Did you find a solution to this? |
Because they explicitly mention in the README that the token length limit is 128, I decided to use Suppose your data frame is called
And now it worked. The other way will be that if too many molecules are discarded because they have a token length larger than 128, you retrain the autoencoder again. Good luck. |
Hi. When trying to create 512 dimensional vector representations of some new molecules (that the encoder may not have seen during training), I get the following error
Traceback (most recent call last):
File "encode.py", line 56, in
encode(**args)
File "encode.py", line 35, in encode
latent = model.transform(model.vectorize(mols_in))
File "/content/latent-gan/ddc_pub/ddc_v3.py", line 1042, in vectorize
return self.smilesvec1.transform(mols_test)
File "/content/latent-gan/molvecgen/vectorizers.py", line 145, in transform
one_hot[i,j+offset,charidx] = 1
IndexError: index -201 is out of bounds for axis 1 with size 138
I am using the pretrained chembl encoder. Any ideas about how to resolve? Thanks
The text was updated successfully, but these errors were encountered: