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

Errors with VAE #25

Open
kramer69 opened this issue Jul 13, 2019 · 1 comment
Open

Errors with VAE #25

kramer69 opened this issue Jul 13, 2019 · 1 comment

Comments

@kramer69
Copy link

There are several errors I got when I trained using the VAE mode. The first training had no problems at all and it ran smoothly. However, after I tried to use live_edit on the result, it says that global name VAE_B1 is not defined, then I tried to continue training and got the same error. I solved this by defining VAE_B1 inside the function. This solved the problem but raised another error. I trained it from scratch, and when I tried to continue the training, what I got is ValueError: Unknown loss function:vae_loss

@HackerPoet
Copy link
Owner

Yeah, that mode was something I experimented with briefly, but stopped pursuing when it didn't work as well, so the code probably rotted a bit.

To get it to work, when loading a model it should look like this, where custom_objects contains the custom definitions:

custom_objects = {'vae_loss': vae_loss, 'vae_sampling': vae_sampling}
model = load_model('model.h5', custom_objects=custom_objects)

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