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

Fix "Error when running style_model.load_state_dict(torch.load('21styles.model'), False)" #37

Merged
merged 4 commits into from
Jun 19, 2020

Conversation

vadimtimakin
Copy link

@vadimtimakin vadimtimakin commented Jun 19, 2020

Using this network in 2020, I found an error when importing model weights. I will not attach a trace, because it is very large, it can be found in the corresponding discussion at this repository. It referred to the network architecture and was probably caused by package updates (as I understood, it had been several years since the network was written). To fix this, I had to add the track_running_stats=True parameter in the Bottleneck, UpBottleneck, Net classes to norm_layer, which is called directly (and not passed as an argument). This was enough to fix the code, I didn't change anything else in the code itself, the architecture was fixed in the attached file.

You can find it here as well: https://pastebin.com/HNyL4uRK
fixed_architecture.zip

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.

3 participants