오류 핸들링
[error] RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8192, 180]], which is output 0 of ViewBackward, is at version 1; expected version 0 instead. Hint: enable anom..
감자156
2024. 2. 23. 20:44
반응형
forward 중에 inplace operaion 이 있어서 역전파 autograd시 무슨 문제가 있다는 말
x += model(x) 이런 꼴이 있는지 확인해보자
t = model(x)
x = x+t
이렇게 바꾸면 됨
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatT
Thanks a lot. it worked for me.
discuss.pytorch.org
반응형