Might be similar to: Getting this Error Message: "RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation" - #2 by ptrblck