Problem with inference_style_transfer
Syed044 opened this issue · 1 comments
Syed044 commented
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 commented
try changing 'state_dict' to 'model'
state_dict = torch.load(model_path, map_location='cpu')['model'].state_dict()