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

bugfix: saving DeepSAD model with pretrain=False #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

youph
Copy link

@youph youph commented Jan 22, 2020

Before the fix, saving the model failed when pretrain was set to False, with the following error:

  File "/Deep-SAD-PyTorch/src/DeepSAD.py", line 133, in save_model
    ae_net_dict = self.ae_net.state_dict() if save_ae else None
AttributeError: 'NoneType' object has no attribute 'state_dict'

This fix checks that self.ae_net is not None before saving the autoencoder.

@youph youph requested a review from lukasruff January 22, 2020 12:36
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

Successfully merging this pull request may close these issues.

1 participant