title: Why does PyTorch gather function require index argument to be of type LongTensor?
body: <p>I'm writing some code in PyTorch and I came across the gather function. Checking the documentation I saw that the index argument takes in a LongTensor, why is that? Why does it need to take in a LongTensor instead of another type such as IntTensor? What are the benefits?</p>