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 5eea426 commit 6d76f31Copy full SHA for 6d76f31
1 file changed
model2vec/train/classifier.py
@@ -84,9 +84,8 @@ def construct_head(self) -> nn.Sequential:
84
if linear_modules:
85
*initial, last = linear_modules
86
for module in initial:
87
- if isinstance(module, nn.Linear):
88
- nn.init.kaiming_uniform_(module.weight, nonlinearity="relu")
89
- nn.init.zeros_(module.bias)
+ nn.init.kaiming_uniform_(module.weight, nonlinearity="relu")
+ nn.init.zeros_(module.bias)
90
# Final layer does not kaiming
91
nn.init.xavier_uniform_(last.weight)
92
nn.init.zeros_(last.bias)
0 commit comments