{"action":"created","issue":{"url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch/issues/25","repository_url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch","labels_url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch/issues/25/comments","events_url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch/issues/25/events","html_url":"https://github.com/chenyuntc/simple-faster-rcnn-pytorch/issues/25","id":306437548,"number":25,"title":"KeyError: 'unexpected key \"classifier.1.weight\" in state_dict'","user":{"login":"Usernamezhx","id":14010625,"avatar_url":"https://avatars3.githubusercontent.com/u/14010625?v=4","gravatar_id":"","url":"https://api.github.com/users/Usernamezhx","html_url":"https://github.com/Usernamezhx","followers_url":"https://api.github.com/users/Usernamezhx/followers","following_url":"https://api.github.com/users/Usernamezhx/following{/other_user}","gists_url":"https://api.github.com/users/Usernamezhx/gists{/gist_id}","starred_url":"https://api.github.com/users/Usernamezhx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Usernamezhx/subscriptions","organizations_url":"https://api.github.com/users/Usernamezhx/orgs","repos_url":"https://api.github.com/users/Usernamezhx/repos","events_url":"https://api.github.com/users/Usernamezhx/events{/privacy}","received_events_url":"https://api.github.com/users/Usernamezhx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-19T12:12:20Z","updated_at":"2018-03-20T02:31:06Z","closed_at":null,"author_association":"NONE","body":"First of all thanks for your code.when i run the command : **python3 train.py train --env='fasterrcnn-caffe' --plot-every=100 --caffe-pretrain**  it will show below. when i search the problew .someone said that the torchvision version should be the 0.1.7. my torchvesion is 0.2.0 . but after installed the torchvision 0.1.8 .it still show me that as the below:\r\n`======user config========\r\n{'caffe_pretrain': True,\r\n 'caffe_pretrain_path': '/root/.torch/models/vgg16-00b39a1b.pth',\r\n 'data': 'voc',\r\n 'debug_file': '/tmp/debugf',\r\n 'env': 'fasterrcnn-caffe',\r\n 'epoch': 14,\r\n 'load_path': None,\r\n 'lr': 0.001,\r\n 'lr_decay': 0.1,\r\n 'max_size': 1000,\r\n 'min_size': 600,\r\n 'num_workers': 8,\r\n 'plot_every': 100,\r\n 'port': 8097,\r\n 'pretrained_model': 'vgg16',\r\n 'roi_sigma': 1.0,\r\n 'rpn_sigma': 3.0,\r\n 'test_num': 10000,\r\n 'test_num_workers': 8,\r\n 'use_adam': False,\r\n 'use_chainer': False,\r\n 'use_drop': False,\r\n 'voc_data_dir': '/data04/data/VOCdevkit/VOC2007/',\r\n 'weight_decay': 0.0005}\r\n==========end============\r\nload data\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 131, in <module>\r\n    fire.Fire()\r\n  File \"/root/anaconda3/lib/python3.6/site-packages/fire/core.py\", line 127, in Fire\r\n    component_trace = _Fire(component, args, context, name)\r\n  File \"/root/anaconda3/lib/python3.6/site-packages/fire/core.py\", line 366, in _Fire\r\n    component, remaining_args)\r\n  File \"/root/anaconda3/lib/python3.6/site-packages/fire/core.py\", line 542, in _CallCallable\r\n    result = fn(*varargs, **kwargs)\r\n  File \"train.py\", line 65, in train\r\n    faster_rcnn = FasterRCNNVGG16()\r\n  File \"/home/work/zhx/simple-faster-rcnn-pytorch/model/faster_rcnn_vgg16.py\", line 62, in __init__\r\n    extractor, classifier = decom_vgg16()\r\n  File \"/home/work/zhx/simple-faster-rcnn-pytorch/model/faster_rcnn_vgg16.py\", line 16, in decom_vgg16\r\n    model.load_state_dict(t.load(opt.caffe_pretrain_path))\r\n  File \"/root/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py\", line 522, in load_state_dict\r\n    .format(name))\r\nKeyError: 'unexpected key \"classifier.1.weight\" in state_dict'\r\n\r\nIf you suspect this is an IPython bug, please report it at:\r\n    https://github.com/ipython/ipython/issues\r\nor send an email to the mailing list at ipython-dev@python.org\r\n\r\nYou can print a more detailed traceback right now with \"%tb\", or use \"%debug\"\r\nto interactively debug it.\r\n\r\nExtra-detailed tracebacks for bug-reporting purposes can be enabled via:\r\n    %config Application.verbose_crash=True`"},"comment":{"url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch/issues/comments/374451672","html_url":"https://github.com/chenyuntc/simple-faster-rcnn-pytorch/issues/25#issuecomment-374451672","issue_url":"https://api.github.com/repos/chenyuntc/simple-faster-rcnn-pytorch/issues/25","id":374451672,"user":{"login":"Usernamezhx","id":14010625,"avatar_url":"https://avatars3.githubusercontent.com/u/14010625?v=4","gravatar_id":"","url":"https://api.github.com/users/Usernamezhx","html_url":"https://github.com/Usernamezhx","followers_url":"https://api.github.com/users/Usernamezhx/followers","following_url":"https://api.github.com/users/Usernamezhx/following{/other_user}","gists_url":"https://api.github.com/users/Usernamezhx/gists{/gist_id}","starred_url":"https://api.github.com/users/Usernamezhx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Usernamezhx/subscriptions","organizations_url":"https://api.github.com/users/Usernamezhx/orgs","repos_url":"https://api.github.com/users/Usernamezhx/repos","events_url":"https://api.github.com/users/Usernamezhx/events{/privacy}","received_events_url":"https://api.github.com/users/Usernamezhx/received_events","type":"User","site_admin":false},"created_at":"2018-03-20T02:31:05Z","updated_at":"2018-03-20T02:31:05Z","author_association":"NONE","body":"thanks for your reply .  I have run the command before :**python misc/convert_caffe_pretrain.py**.and change the path:**caffe_pretrain_path** . I find below in google maybe helpful. I am new pytorch.\r\nhttps://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686"}}
{"actor":{"display_login":"Usernamezhx"}}