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

UserWarning: nn.Sampling is deprecated. Use nn.functional.interpolate instead. #18

Open LiPu-2019 opened 5 years ago

LiPu-2019 commented 5 years ago

os: ubuntu 16.04.6 (not in virtual machine) python: 3.6.8 pytorch: 0.4.1 cpu edition. I have cuda 9.0 and cudnn 7.1.3, but because my gpu memory is too low, so i just install pytorch-cpu. branch: support-pytorch-v0.4 while I was trying to train the model some error occured. It says "Killed". and it gave me 2 warnings. I suppose maybe it because the deprecated nn.Sampling. According to the second warning, I changed models.py like this:

original edition:

output_prob.append([nn.Upsample(scale_factor=16, mode='bilinear',align_corners=True).forward(F.grid_sample(self.pushnet(interm_push_feat), flow_grid_after)), nn.Upsample(scale_factor=16, mode='bilinear',align_corners=True).forward(F.grid_sample(self.graspnet(interm_grasp_feat), flow_grid_after))])

changed edition:

output_prob.append([F.interpolate(F.grid_sample(self.pushnet(interm_push_feat), flow_grid_after), scale_factor=16, mode='bilinear',align_corners=True), F.interpolate(F.grid_sample(self.graspnet(interm_grasp_feat), flow_grid_after), scale_factor=16, mode='bilinear',align_corners=True)]) I changed all the use of nn.Upsample in models.py.

croped

after I changed models.py second warning disppeared but program still got killed. I shot the pic with my phone because the computer is crashed(for several times). warning2

btw, i switch to win7 to try it again ,but still fail . image

LiPu-2019 commented 5 years ago

I switched to master branch and ran the trained model again on the same os with pytorch-cpu-0.3.1. This time it worked fine at first 5 minutes, then os crashed again... I tried to resart the ubuntu gui, but didn't work... my computer has i5-4210h+gtx960m(2g gpu ram)+16GRAM. Is that because my computer too weak or the os is not stable??