bigchem / synthesis

Contains results and data from Augmented Transformer article
33 stars 9 forks source link

Weird predictions in gen_beam() #2

Open HelloJocelynLu opened 3 years ago

HelloJocelynLu commented 3 years ago

Hi there, I was trying to run the model. After trying:

$ python transformer.py --predict uspto-50k/patents_test100.csv.can --model models/base-retrosynthesis.h5

I got “list index out of range” error and upon checking, I found that "Final beams: 0". The function gen(mdl, product) works as normal but the same product produces meaningless sequences, such as “c12c(cccc2C2c2c3c(c(cc3C2C2c3c(cc(cc3C1)C2c1coc(c1)Cl)cs2...” in gen_beam(mdl_encoder, mdl_decoder, T, product, beam_size) function.

Did I miss something? Any help/suggestion would be appreciated!

hhr114 commented 3 years ago

Hi there, I was trying to run the model. After trying:

$ python transformer.py --predict uspto-50k/patents_test100.csv.can --model models/base-retrosynthesis.h5

I got “list index out of range” error and upon checking, I found that "Final beams: 0". The function gen(mdl, product) works as normal but the same product produces meaningless sequences, such as “c12c(cccc2C2c2c3c(c(cc3C2C2c3c(cc(cc3C1)C2c1coc(c1)Cl)cs2...” in gen_beam(mdl_encoder, mdl_decoder, T, product, beam_size) function.

Did I miss something? Any help/suggestion would be appreciated!

Hello, I met the same problem when trying

python transformer.py --validate uspto-50k/patents_test100.csv.can --model storage/tr-119.h5

Do u know how to generate result file as file type '.csv'? Thx

如果您会中文的话,也许咱们可以通过微信进行高效的沟通交流,我的微信号是 He_2262 ,谢谢!