Skip to content

Commit d27d58f

Browse files
committed
FIX Tucker indexing for edge case
1 parent 5f4d0e5 commit d27d58f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tltorch/factorized_tensors/factorized_tensors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,10 @@ def __getitem__(self, indices):
346346
else:
347347
factors.append(factor[index, :])
348348

349-
core = tenalg.multi_mode_dot(self.core, factors_contract, modes=modes)
349+
if modes:
350+
core = tenalg.multi_mode_dot(self.core, factors_contract, modes=modes)
351+
else:
352+
core = self.core
350353
factors = factors + self.factors[i+1:]
351354

352355
if factors:

0 commit comments

Comments
 (0)