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

NotImplementedError: nn.functional.grid_sample got unsupported mode: 'nearest' #4

Open me2george opened 6 years ago

me2george commented 6 years ago

Hello,while running main.py, I got some error. Any solutions or suggestions for this issue? My enviroment: windows10 + NVIDIA GTX 1080(which has 8GB GPU memory) + python3.6+pytorch0.4+V-rep3.5. And I use the code for pytorch 0.4. image Thanks for your answer.

andyzeng commented 6 years ago

Removing mode='nearest' for all nn.functional.grid_sample calls in models.py should fix it. The behavior of nn.functional.grid_sample should remain the same (bilinear sampling instead of nearest neighbor), since mode='nearest' was never implemented and the "unsupported mode" warning only started showing up in PyTorch 0.4.

me2george commented 6 years ago

Thanks very much ! The problem solved !