It’s a problem that we’ve fixed recently. The second module will raise an error now. We decided to roll back some of the support for LongTensor indexing, because it wasn’t consistent with numpy and had these issues in autograd. You first module indexes the Variable with two int objects, the second one uses two torch.LongTensors (we now only allow using a single torch.LongTensor as the last index).
Updating to 0.1.10 should fix it.