This occurs when I tried to convert a list of tensors to a tensor by using: torch.tensor() solve for this: torch.stack()