Convert torch tensor to long tensor. bool (memory_format = torch.