Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator of CudnnConvolutionBackward(ThnnConv2DBackward), ThresholdBackward1 Not found #18

Open
peyer opened this issue Jun 27, 2018 · 5 comments

Comments

@peyer
Copy link

peyer commented Jun 27, 2018

Hi, @longcw, thanks for your work. Recently, I need to transform a pytorch model(RFBNet) which has two sibling output to caffe's format. When I used your pytorch2caffe function, it shown that CudnnConvolutionBackward not in dict of layer_dict, when I set torch.backends.cudnn.enabled==False, it shown that ThnnConv2DBackward not in dict of layer_dict. Additionly, MulBackward0,AddBackward1 as the same. How should I parse the
operator of CudnnConvolutionBackward(ThnnConv2DBackward), ThresholdBackward1, ThresholdBackward0, MulBackward0, AddBackward1?
The version of torch I used is 0.4.0

@ShadowLau
Copy link

@peyer 0.4.0 is not supported, you should transform the model manully. If you really want to parse AddBackward1, you should change the key value "AddBackward" to "AddBackward1" in layer_dict. Other layers are similar.

@onnx20
Copy link

onnx20 commented Jan 16, 2019

@peyer
Hi,I have the same problem ,Has your problem been solved ?

File "/home/iiai/oyrq/pytorch2caffe-master/pytorch2caffe.py", line 192, in add_layer
layer['type'] = layer_dict[parent_type]
KeyError: 'ThnnConv2DBackward'

@Vincentqyw
Copy link

@peyer same issue, have you solve this issue ?

@onnx20
Copy link

onnx20 commented Sep 12, 2019

@peyer same issue, have you solve this issue ?

torch.backends.cudnn.enabled = False
torch.backends.cudnn.benchmark = False

if 'ThresholdBackward1' Not found, you can add ( 'ThresholdBackward1' : 'ReLU') to layer_dict

@Vincentqyw
Copy link

@OYRQ thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants