One of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8, 632, 512]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead

Sorry i was able to solve the issue by following the link