GithubHelp home page GithubHelp logo

Comments (6)

chenyuntc avatar chenyuntc commented on May 28, 2024

Have you run python misc/convert_caffe_pretrain.py before exec this? Something seems to be wrong with the caffe-pretrained file.

from simple-faster-rcnn-pytorch.

Usernamezhx avatar Usernamezhx commented on May 28, 2024

thanks for your reply . I have run the command before :python misc/convert_caffe_pretrain.py. that I find the vgg16-00b39a1b.pth in folder /root/.torch/models and change the path:caffe_pretrain_path . but i doesnot work .I find below in google maybe helpful. I am new pytorch.
https://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686

from simple-faster-rcnn-pytorch.

chenyuntc avatar chenyuntc commented on May 28, 2024

Not vgg16-00b39a1b.pth, it should be vgg16_caffe.pth

from simple-faster-rcnn-pytorch.

Usernamezhx avatar Usernamezhx commented on May 28, 2024

yeah it works . I was confused by the log :Downloading: "https://s3-us-west-2.amazonaws.com/jcjohns-models/vgg16-00b39a1b.pth" to /root/.torch/models/vgg16-00b39a1b.pth and then i check your python misc/convert_caffe_pretrain.py find that you modify the model vgg16-00b39a1b.pth and then produce the vgg16_caffe.pth. : P

from simple-faster-rcnn-pytorch.

Usernamezhx avatar Usernamezhx commented on May 28, 2024

thanks your code let me know how faster rcnn work ! it so cooooooool~

from simple-faster-rcnn-pytorch.

riciche avatar riciche commented on May 28, 2024

I have run the command python misc/convert_caffe_pretrain.py and change vgg16-00b39a1b.pth to vgg16_caffe.pth, but there still a mistake, can you tell me why ,thank you.
======user config========
{'caffe_pretrain': True,
'caffe_pretrain_path': 'C:\Users\superlee\Desktop\simple-faster-rcnn-pytorch-master\vgg16_caffe.pth',
'data': 'voc',
'debug_file': '/tmp/debugf',
'env': 'fasterrcnn-caffe',
'epoch': 14,
'load_path': None,
'lr': 0.001,
'lr_decay': 0.1,
'max_size': 1000,
'min_size': 600,
'num_workers': 8,
'plot_every': 100,
'port': 8097,
'pretrained_model': 'vgg16',
'roi_sigma': 1.0,
'rpn_sigma': 3.0,
'test_num': 10000,
'test_num_workers': 8,
'use_adam': False,
'use_chainer': False,
'use_drop': False,
'voc_data_dir': 'C:\Users\superlee\Desktop\VOC\VOCdevkit\VOC2007',
'weight_decay': 0.0005}
==========end============
load data
Traceback (most recent call last):
File "train.py", line 132, in
fire.Fire()
File "C:\ProgramData\Anaconda3\lib\site-packages\fire\core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "C:\ProgramData\Anaconda3\lib\site-packages\fire\core.py", line 366, in _Fire
component, remaining_args)
File "C:\ProgramData\Anaconda3\lib\site-packages\fire\core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "train.py", line 67, in train
faster_rcnn = FasterRCNNVGG16()
File "C:\Users\superlee\Desktop\simple-faster-rcnn-pytorch-master\model\faster_rcnn_vgg16.py", line 63, in init
extractor, classifier = decom_vgg16()
File "C:\Users\superlee\Desktop\simple-faster-rcnn-pytorch-master\model\faster_rcnn_vgg16.py", line 17, in decom_vgg16
model.load_state_dict(t.load(opt.caffe_pretrain_path))
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 721, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for VGG:
Missing key(s) in state_dict: "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias".
Unexpected key(s) in state_dict: "classifier.1.weight", "classifier.1.bias", "classifier.4.weight", "classifier.4.bias".

If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True

from simple-faster-rcnn-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.