Error

RuntimeError: Function MmBackward returned an invalid gradien

HUR129 2022. 9. 16. 15:25

순전파는 잘 나와서 loss 값까지 잘 얻어지는데...

 

RuntimeError: Function MmBackward returned an invalid gradien~~~~

 

뭐라고 뜨면서 autograd가 문제가 생기는 현상이 있습니다.

 

3주동안 이것저것 다건드려봤는데 결국...

 

pytorch 1.9.0이하의 문제라서 1.9.1 + cu111 설치했더니 바로 해결...

 

https://discuss.pytorch.org/t/mmbackward-returned-an-invalid-gradient-at-index-0/132956

 

MmBackward returned an invalid gradient at index 0?

I’m collecting two different measures of loss and propagating both of them to a single network. During the loss.backward() to the generator, I get this error about an invalid gradient at index 0. Here is the code block: for epoch in range(num_epochs): fo

discuss.pytorch.org

 

후... 현타오네요 ㅠㅠ