Hello guys!
I’m getting the following error when calling .backward():
Encounter the RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
for i, j, k in zip(X, Y, Z):
A[:, i, j] = A[:, i, j] + k
X and Y are leaf tensors. Z is a non-leaf tensor resulting from the previous layer.
X, Y pairs are non-unique: Ex. (3, 9, 0.5), (3, 9, 0.4) should result in (3, 9, 0.9)
I’ve tried .clone(), torch.add(), torch.sum(), and so on.
Please help!