Closed Beniko95J closed 4 years ago
hi, are you using python3?
Yes, I am using python3.
the encoding is different between python2 and python3. Check this out: https://stackoverflow.com/questions/28218466/unpickling-a-python-2-object-with-python-3
Thank you for the quick reply and now i can solve this problem.
However, i meet another problem about the version issue of python2 and python3. the error message is as follows, seems to be related to the difference of division in python2 and python3:
/home/benik/Documents/MVDepthNet/MVDepthNet/depthNet_model.py:117: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaimingnormal.
init.kaiming_normal(m.weight, mode='fan_out')
/home/benik/Documents/MVDepthNet/MVDepthNet/depthNetmodel.py:123: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant.
init.constant(m.weight, 1)
/home/benik/Documents/MVDepthNet/MVDepthNet/depthNetmodel.py:125: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant.
init.constant(m.bias, 0)
/home/benik/Documents/MVDepthNet/MVDepthNet/depthNetmodel.py:120: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant.
init.constant(m.bias, 0)
example.py:39: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():
instead.
depth_image_cuda = Variable(depth_image_cuda, volatile=True)
example.py:42: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():
instead.
left_image_cuda = Variable(left_image_cuda, volatile=True)
example.py:45: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():
instead.
right_image_cuda = Variable(right_image_cuda, volatile=True)
Traceback (most recent call last):
File "example.py", line 62, in
Would you please tell me where should I change your code to make it run under python3?
Thank you very much!
Sorry, I did not test the code in python3. Maybe you need to do it yourself.
One hint from the information you provided. Add int to all the padding.
https://github.com/HKUST-Aerial-Robotics/MVDepthNet/blob/7a13790369559a365ee0fd914f12cfb3524c759b/depthNet_model.py#L22 to
padding = int((kernel_size - 1)/2)
It works, thank you for the replies.
Cheers,
Hi, thank you for the project!
When I run the example.py, I meet the following decoding problem:
Is the sample images link(https://www.dropbox.com/s/hr59f24byc3x8z3/sample_data.pkl.tar.gz?dl=0) degenerated or should I modify the encoding? (I have tried encoding='utf-8' but still does not work).
Thanks!