xxradon / PytorchToCaffe

Pytorch model to caffe model, supported pytorch 0.3, 0.3.1, 0.4, 0.4.1 ,1.0 , 1.0.1 , 1.2 ,1.3 .notice that only pytorch 1.1 have some bugs
MIT License
783 stars 224 forks source link

AttributeError: 'module' object has no attribute 'walk_stack' #57

Open IsDora opened 4 years ago

IsDora commented 4 years ago

Hello, thanks for your projects, if i have no condition to update the python version(now is 2.7), can i change the code to solve the problem? Sincerely hope to get your help ~ File "example/resnet_pytorch_2_caffe.py", line 19, in pytorch_to_caffe.trans_net(resnet50,input,name) File "./pytorch_to_caffe.py", line 763, in trans_net out = net.forward(input_var) File "/opt/Envs/pyenv/versions/Caffe/lib/python2.7/site-packages/torchvision/models/resnet.py", line 192, in forward x = self.conv1(x) File "/opt/Envs/pyenv/versions/Caffe/lib/python2.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/opt/Envs/pyenv/versions/Caffe/lib/python2.7/site-packages/torch/nn/modules/conv.py", line 338, in forward self.padding, self.dilation, self.groups) File "./pytorch_to_caffe.py", line 659, in call for stack in traceback.walk_stack(None): AttributeError: 'module' object has no attribute 'walk_stack'