RuntimeError: tensors used as indices must be long or byte tensors

RuntimeError: tensors used as indices must be long or byte tensors

Change the datatype to torch.long