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.

evaluation error using pre-trained model

See original GitHub issue

Hi Ruotian,

I tried to run the following script: python eval.py --model resnet50.pth --infos_path infos.pkl --image_folder ./image/val2014_coco/ --num_images 1

The model was resnet50 (and resnet101) downloaded from your google drive. But I got the error: Traceback (most recent call last): File "eval.py", line 102, in <module> model.load_state_dict(torch.load(opt.model)) File "/home/wentong/miniconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 522, in load_state_dict .format(name)) KeyError: 'unexpected key "conv1.weight" in state_dict'

I have searched online but there was little information about that. I guess you have used multiple gpus.

Any advice? Thank you for your implementation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ruotianluocommented, Sep 28, 2018

I mean you could follow these commits and change the ImageCapitoning.pytorch one.

0reactions
metro-smilescommented, Sep 28, 2018

Will these still fix the problem of arbitrary images?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Evaluation with pre-trained model results in Type error
I have a trained inceptionV3 model that I want to test on a new data set. However, i am getting TypeError concerning shape...
Read more >
Error when run evaluation by pretrained model · Issue #11 ... - GitHub
I prepared the pretrained model ResNet50 and validation data(data_depth_selection). When I run python evaluate_completion.py --load_weights_...
Read more >
Detecting Label Errors using Pre-Trained Language Models
Abstract: For identifying label errors in natural language datasets, we show that large pre-trained language models are extremely capable: ...
Read more >
Transfer learning from pre-trained models | by Pedro Marcelino
A comprehensive review of pre-trained models' performance on computer vision problems using data from the ImageNet (Deng et al.
Read more >
Fine-tune a pretrained model - Hugging Face
When you use a pretrained model, you train it on a dataset specific to your task. This is known as fine-tuning, an incredibly...
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