From ba6a8ec8507585b637a2c1b5ae3d9a230aa75c26 Mon Sep 17 00:00:00 2001 From: Jean Kossaifi Date: Tue, 10 Jan 2023 10:06:27 -0800 Subject: [PATCH] FIX TCL --- tltorch/factorized_layers/tensor_contraction_layers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tltorch/factorized_layers/tensor_contraction_layers.py b/tltorch/factorized_layers/tensor_contraction_layers.py index cb98282..c85e0e0 100644 --- a/tltorch/factorized_layers/tensor_contraction_layers.py +++ b/tltorch/factorized_layers/tensor_contraction_layers.py @@ -88,7 +88,7 @@ def reset_parameters(self): This may be renamed to init_from_random for consistency with TensorModules """ for i in range(self.order): - init.kaiming_uniform_(self.factors[i], a=math.sqrt(5)) + init.kaiming_uniform_(getattr(self, f'factor_{i}'), a=math.sqrt(5)) if self.bias is not None: bound = 1 / math.sqrt(self.input_shape[0]) init.uniform_(self.bias, -bound, bound)