Indexing is very slow for backpropagation

There’s been perf improvements to autograd in pytorch 0.3 (coming soon). You could try building from source or waiting for the release.