Hi,
sorry for so delayed reply.
Problem I had:
compute the sum along 3rd dimension of a tensor 340x340x700k. When tryint to do this, i got overflow message because pytorch tries to convert a tensor to a LongTensor.
Solution
iterate throug slices, for example 340x340x1000, sim them along 3rd dimension and add to the result tensor of size 340x340.
I wend through the code and it looks like the change might require huge amount of effort. but the problem is clear: it is useless to allocate memory for all tensor dimensions when summing it up.