pytorch2caffe icon indicating copy to clipboard operation
pytorch2caffe copied to clipboard

bias=False in nn.Linear error

Open polo5 opened this issue 7 years ago • 0 comments

I've traced down this error:

in add_layer
    inner_product_param['num_output'] = func.next_functions[0][0].variable.size(0)
AttributeError: 'NoneType' object has no attribute 'variable'

to the use of bias=False for a nn.Linear layer in Pytorch. Note that this parameter for nn.Conv2d works fine. Any idea for a quick fix or do I have to do surgery on my Pytorch pretrained model and add some zero biases?

polo5 avatar Jun 26 '18 14:06 polo5