Open hmchuong opened 6 years ago
I feel like it is because of the way he passed loss to scheduler. Instead of only adding values during develop, he added tensor, which accumulated too many memory. You can just unpack the value.
losstensorMean += losstensor
to
losstensorMean += losstensor.data[0]
when we change to that, the losstensorMean and lossVal will receive the same value, isn't it?
@hmchuong hi hmchuong, I trained on 2 1080ti and also met the problem. Meanwhile, the GPU memory usage isn't too high. Did you solve the issue? Thanks!
The problem is still ongoing, any suggestions?? Adding [0] or .item() does not work either, even for batch size of 2.
I used 2xTeslaK80(12GB each) for training from scratch with batchSize=16 but always got out of memory at the end of the first epoch. Have you trained with the same batchSize on your machine?