andyzeng / visual-pushing-grasping

Train robotic agents to learn to plan pushing and grasping actions for manipulation with deep reinforcement learning.
http://vpg.cs.princeton.edu/
BSD 2-Clause "Simplified" License
898 stars 315 forks source link

KeyError: 'unexpected key "push_color_trunk.features.denseblock1.denselayer1.norm.1.weight" in state_dict' #3

Closed OMGdxy closed 6 years ago

OMGdxy commented 6 years ago

hello,when I run main.py, I got the error . Any solutions or suggestions for this issue? My enviroment: ubuntu16.04 + python2.7+pytorch 0.3+V-rep3.5 ,running with only CPU. thank you for your answer

andyzeng commented 6 years ago

Interesting. This error looks a bit like what you would get if you tried loading our pre-trained weights with pytorch 0.4. Just to confirm, what does the following print out?

echo -e "import torch\nimport torchvision\nprint(torch.__version__)\nprint(torchvision.__version__)" | python2.7
OMGdxy commented 6 years ago

Thanks for your reply. My torch is 0.3.1 version and torchvision is 0.2.1. I did not run the demo, but I can train the VPG policy from scratch.

andyzeng commented 6 years ago

I see. The problem is that torchvision is 0.2.1 (recent update to support pytorch 0.4). Installing torchvision 0.2.0 should fix the mismatch:

pip uninstall torchvision
pip install torchvision==0.2.0
OMGdxy commented 6 years ago

Thanks for your guidance. Now I can run the demo with pre-trained weights. I'm a beginner in robot and AI. Your code is very helpful for my study. Thank you very much.