I got this error because I was doing accumulated gradients (because I want my effective batch size to be larger than what can fit on my gpu at any given time) and this message showed when it tried to backprop the loss… seems like just a memory issue in some cases