Skip to content
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

NameError: name 'TerminalGRU' is not defined #26

Open
ramashka328 opened this issue Mar 18, 2020 · 2 comments
Open

NameError: name 'TerminalGRU' is not defined #26

ramashka328 opened this issue Mar 18, 2020 · 2 comments

Comments

@ramashka328
Copy link

Hi. I am trying to implement your model using the code line as follows:

vae = VAEUtils(directory='C:\Users\Autoencoder\chemical_vae-master\models\zinc_properties')

but however it results in the error:

~\Autoencoder\chemical_vae-master\chemvae\vae_utils.py in init(self, exp_file, encoder_file, decoder_file, directory)
55 # encoder, decoder
56 self.enc = load_encoder(self.params)
---> 57 self.dec = load_decoder(self.params)
58 self.encode, self.decode = self.enc_dec_functions()
59 self.data = None

~\Autoencoder\chemical_vae-master\chemvae\vae_utils.py in load_decoder(params)
21 def load_decoder(params):
22 if params['do_tgru']:
---> 23 return load_model(params['decoder_weights_file'], custom_objects={'TerminalGRU': TerminalGRU})
24 else:
25 return load_model(params['decoder_weights_file'])

NameError: name 'TerminalGRU' is not defined

Could you tell me, what should I do to make it work?

@mkduong-ai
Copy link

Did you install it via setup.py?
tgru_k2_gpu.py is the file where the TerminalGRU Layer is defined for the decoder model. Check whether vae_utils.py has from tgru_k2_gpu import TerminalGRU in it.

@ramashka328
Copy link
Author

Thank You, it worked when I installed it using setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants