ragas:

trX = torch.stack(trX).float()


I don’t see the whole code unfortunately but I meant
trX = np.stack(trX).toTensor
instead of
trX = torch.stack(trX).float
According to your error message, when Torch tries to unsqueeze he gets a numpy.ndarray not a torch tensor