question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while testing over pretrained model

See original GitHub issue

I am using pytorch v1.0, python 3.6 and using the same commit as the release of the librispeech pretrained model. When I try to run on librispeech pretrained model as- python3 test.py --model-path librispeech.pth --test-manifest an4_val_manifest.csv

I get this error- RuntimeError: Error(s) in loading state_dict for DeepSpeech: Missing key(s) in state_dict: "conv.seq_module.0.weight", "conv.seq_module.0.bias", "conv.seq_module.1.weight", "conv.seq_module.1.bias", "conv.seq_module.1.running_mean", "conv.seq_module.1.running_var", "conv.seq_module.3.weight", "conv.seq_module.3.bias", "conv.seq_module.4.weight", "conv.seq_module.4.bias", "conv.seq_module.4.running_mean", "conv.seq_module.4.running_var", "rnns.0.rnn.bias_ih_l0", "rnns.0.rnn.bias_hh_l0", "rnns.0.rnn.bias_ih_l0_reverse", "rnns.0.rnn.bias_hh_l0_reverse", "rnns.1.rnn.bias_ih_l0", "rnns.1.rnn.bias_hh_l0", "rnns.1.rnn.bias_ih_l0_reverse", "rnns.1.rnn.bias_hh_l0_reverse" Unexpected key(s) in state_dict: "conv.0.weight", "conv.0.bias", "conv.1.weight", "conv.1.bias", "conv.1.running_mean", "conv.1.running_var", "conv.3.weight", "conv.3.bias", "conv.4.weight", "conv.4.bias", "conv.4.running_mean", "conv.4.running_var". size mismatch for rnns.0.rnn.weight_ih_l0: copying a param with shape torch.Size([2400, 672]) from checkpoint, the shape in current model is torch.Size([2400, 1312]). size mismatch for rnns.0.rnn.weight_ih_l0_reverse: copying a param with shape torch.Size([2400, 672]) from checkpoint, the shape in current model is torch.Size([2400, 1312]).

Can anyone please help, How to fix this error?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lucgeocommented, Mar 5, 2019

Hi,

Using the 80a060f I got two other different errors:

size mismatch for rnns.0.rnn.weight_ih_l0: copying a param of torch.Size([2400, 1312]) from checkpoint, where the shape is torch.Size([2400, 672]) in current model. size mismatch for rnns.0.rnn.weight_ih_l0_reverse: copying a param of torch.Size([2400, 1312]) from checkpoint, where the shape is torch.Size([2400, 672]) in current model.

Lucian

0reactions
stale[bot]commented, Feb 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while testing the pretrained model · Issue #13 - GitHub
InvalidArgumentError : 2 root error(s) found. (0) Invalid argument: Incompatible shapes: [65536] vs.
Read more >
Error while using VGG16 pretrained model for grayscale images
I am new to working with pre-trained models. When I am trying to run the code with color images with 3 channels, my...
Read more >
What to do when you get an error - Hugging Face Course
The first suggestion is asking us to check whether the model ID is actually correct, so the first order of business is to...
Read more >
The Model Performance Mismatch Problem (and what to do ...
1. Model Overfitting · Try a k-fold cross-validation evaluation of the model on the test dataset. · Try a fit of the model...
Read more >
Inference with pretrained models
Inference with pretrained models. We provide testing scripts to evaluate a whole dataset (Cityscapes, PASCAL VOC, ADE20k, etc.), and also some high-level ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found