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 11cd9e4 commit ba6a8ecCopy full SHA for ba6a8ec
tltorch/factorized_layers/tensor_contraction_layers.py
@@ -88,7 +88,7 @@ def reset_parameters(self):
88
This may be renamed to init_from_random for consistency with TensorModules
89
"""
90
for i in range(self.order):
91
- init.kaiming_uniform_(self.factors[i], a=math.sqrt(5))
+ init.kaiming_uniform_(getattr(self, f'factor_{i}'), a=math.sqrt(5))
92
if self.bias is not None:
93
bound = 1 / math.sqrt(self.input_shape[0])
94
init.uniform_(self.bias, -bound, bound)
0 commit comments