Since pytorch 0.1.12 is an older version, it is probably the case that the indexing by long tensor feature wasn’t implemented back then. You should use the more recent version of pytorch; they come with a lot of bugfixes and performance improvements.
Is there anything preventing you from just using 0.2 instead of 0.1?