반응형
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
반응형