Hmm, that’s strange. Let me check, if this is expected behavior:
torch.tensor([torch.tensor(0.), torch.tensor(1.)]) # works
torch.tensor([torch.tensor(0), torch.tensor(1)], dtype=torch.int32) # works
torch.tensor([torch.tensor(0.), torch.tensor(1.)], dtype=torch.int32) # fails
# > TypeError: only integer tensors of a single element can be converted to an index