wengong-jin / icml18-jtnn

Junction Tree Variational Autoencoder for Molecular Graph Generation (ICML 2018)
MIT License
513 stars 190 forks source link

About a bug in File "icml18-jtnn/fast_jtnn/chemutils.py", #38

Closed huangwb closed 5 years ago

huangwb commented 5 years ago

I obain a bug when runing to icml18-jtnn/fast_jtnn/chemutils.py: " line 320, in
get_nid = lambda x:0 if node.is_leaf else node.nid NameError: name 'node' is not defined " I find that here the variable "node" should be "ctr_node". The code is ok after I fixed it.

wengong-jin commented 5 years ago

Thanks for pointing this out. The correct fix is

get_nid = lambda x:0 if x.is_leaf else x.nid

The code has been fixed.