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

Problem with inference_style_transfer #127

Open
Syed044 opened this issue Aug 11, 2021 · 1 comment
Open

Problem with inference_style_transfer #127

Syed044 opened this issue Aug 11, 2021 · 1 comment

Comments

@Syed044
Copy link

Syed044 commented Aug 11, 2021

Hello,

When you check the examples, its very exciting to invest time and effort to collect the data and train the model, however after putting a lot of effort in collecting data and training. You hit an error.

KeyError Traceback (most recent call last)
in
1 model_path = "models/model_10100"
----> 2 state_dict = torch.load(model_path, map_location='cpu')['state_dict']
3 model = Flowtron(**model_config)
4 model.load_state_dict(state_dict)
5 _ = model.eval().cuda()

KeyError: 'state_dict'

i am a newbee still trying to learn so please bare with me and help me how to solve this issue.

@deepglugs
Copy link

deepglugs commented Aug 24, 2021

try changing 'state_dict' to 'model'

state_dict = torch.load(model_path, map_location='cpu')['model'].state_dict()

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