We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76f7d74 commit 7d58765Copy full SHA for 7d58765
docs/source/notes/extending.rst
@@ -132,7 +132,7 @@ This is how a ``Linear`` module can be implemented::
132
# nn.Parameters can never be volatile and, different than Variables,
133
# they require gradients by default.
134
self.weight = nn.Parameter(torch.Tensor(input_features, output_features))
135
- if bias is not None:
+ if bias:
136
self.bias = nn.Parameter(torch.Tensor(output_features))
137
else:
138
# You should always register all possible parameters, but the
0 commit comments