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

bias=False in nn.Linear error #17

Open
polo5 opened this issue Jun 26, 2018 · 0 comments
Open

bias=False in nn.Linear error #17

polo5 opened this issue Jun 26, 2018 · 0 comments

Comments

@polo5
Copy link

polo5 commented Jun 26, 2018

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?

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

1 participant