Skip to content

[Bug probably?] nn.Linear should set self.bias to None when initializer is called with param bias=False #780

Answered by angeloskath
adhulipa asked this question in Q&A
Discussion options

You must be logged in to vote

I would not say it is a bug but rather a choice, maybe a bad one but a choice nonetheless. Namely, we choose to not add it and then we do the check using "bias" in self as is done in nn.Linear.

Now having said that, I see that you are indeed encountering a bug which is fixed on main (but not on v0.5.0). This function should be calling __getattribute__ and not __getattr__ on super().

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@adhulipa
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by adhulipa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants