wengong-jin / icml18-jtnn

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

Runtime error while generating latent features for own data #29

Open NamanChuriwala opened 5 years ago

NamanChuriwala commented 5 years ago

**Traceback (most recent call last): File "gen_latent_new.py", line 79, in mol_vec = model.encode_latent_mean(batch) File "/home/naman_churiwala_quantiphi_com/icml18-jtnn/jtnn/jtnn_vae.py", line 62, in encode_latentmean , tree_vec, mol_vec = self.encode(mol_batch) File "/home/naman_churiwala_quantiphi_com/icml18-jtnn/jtnn/jtnn_vae.py", line 51, in encode tree_mess,tree_vec = self.jtnn(root_batch) File "/home/naman_churiwala_quantiphi_com/anaconda3/envs/ChemGAN_1/lib/python2.7/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, kwargs) File "/home/naman_churiwala_quantiphi_com/icml18-jtnn/jtnn/jtnn_enc.py", line 68, in forward new_h = GRU(cur_x, cur_h_nei, self.W_z, self.W_r, self.U_r, self.W_h) File "/home/naman_churiwala_quantiphi_com/icml18-jtnn/jtnn/nnutils.py", line 21, in GRU z_input = torch.cat([x,sum_h], dim=1)****

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 1 and 2 in dimension 0 at /opt/conda/conda-bld/pytorch_1532494458937/work/aten/src/TH/generic/THTensorMath.cpp:3616