aspuru-guzik-group / chemical_vae

Code for 10.1021/acscentsci.7b00572, now running on Keras 2.0 and Tensorflow
Apache License 2.0
470 stars 178 forks source link

Decoder expects 3 inputs but it received 2 inputs #27

Open mkduong-ai opened 4 years ago

mkduong-ai commented 4 years ago

Firstly, the requirements cannot be installed through conda because they are too outdated. Keras always returns "AttributeError: can't set attribute" when trying to load the Decoder. This is due to the chemvae/tgru_k2_gpu.py Layer. self.units = .. should be changed to any other names because Keras/Tensorflow does not allow to set attributes from the super class. The same goes for the variable self.recurrent_dropout

After fixing both, I still get an error Layer decoder_tgru expects 3 inputs, but it received 2 input tensors. Input received: [<tf.Tensor 'decoder_gru2_1/transpose_1:0' shape=(None, 120, 488) dtype=float32>, <tf.Tensor 'decoder_true_seq_input_2:0' shape=(None, 120, 35) dtype=float32>]

I still cannot figure out what is wrong with layer. Should I use former TF, Keras Versions to make it work?