순전파는 잘 나와서 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
후... 현타오네요 ㅠㅠ
'Error' 카테고리의 다른 글
[Error] wget 윈도우 / wget : command not found (0) | 2022.11.18 |
---|---|
[python] keyboard module (left/right/up/down) (0) | 2022.04.22 |
[Python] *args에 대한 고찰 (0) | 2022.03.03 |
[Pytorch] RuntimeError: Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead. (0) | 2022.02.26 |
[Pytorch] Resnet custom layer training / getting (0) | 2022.02.02 |