Fix bug in handling labels with LabelTensor (#460)

---------

Co-authored-by: Filippo Olivo <filippo@filippoolivo.com>
This commit is contained in:
MatteB03
2025-02-25 14:12:51 +01:00
committed by Nicola Demo
parent 42ab1a666b
commit 1bb35f7951
2 changed files with 4 additions and 1 deletions

View File

@@ -265,7 +265,7 @@ class ContinuousConvBlock(BaseContinuousConv):
"""
# initialize to all zeros
tmp = torch.zeros_like(X)
tmp = torch.zeros_like(X).as_subclass(torch.Tensor)
tmp[..., :-1] = X[..., :-1]
# save on tmp