본문 바로가기
728x90

Deep Learning (AI)/Pytorch Errors4

[Pytorch] Inplace error 해결 inplace error - 텐서의 임의의 값을 변경(대체) 헀을 때 gradient가 끊기면서 발생하는 문제 - ex) a = b 이런식으로 대체할 경우에 발생함. a += 1 이런식의 표현도 에러가 발생할 수 있음. -> a = a + 1, 이렇게 수행해야 한다. a[index] = b 이런식의 표현도 동일. - 해결책은 clone()을 사용해서 텐서를 복사후에 대체를 하고 넘겨주면 된다. - ex) c = a.clone() c[index] = b a = c return a 2023. 7. 29.
[에러해결] apex was installed without --cuda_ext. Fused syncbn kernels will be unavailable. Python fallbacks will be used instead. pip uninstall apex cd apex rm -rf build (if it exists) python setup.py install --cuda_ext --cpp_ext run again, clear! https://github.com/NVIDIA/apex/issues/86 Warning: apex was installed without --cuda_ext. · Issue #86 · NVIDIA/apex I install apex according this sentence: python setup.py install --cuda_ext --cpp_ext 2.After that, using import apex to test, but it report warning as following: War.. 2023. 7. 16.
[에러해결] Argument save_interval is deprecated and should be None. This argument will be removed in 0.5.0.Please, use events filtering instead, e.g. Events.ITERATION_STARTED(every=1000) 해결 if u install ignite then uninstall ignite next, pip insatll pytorch-ignite==0.1.2 clear! 2023. 7. 16.
[에러해결] no module named 'torchvision.models.utils 해결 from torchvision.models.utils import load_state_dict_from_url 예전 버전이므로 아래와 같이 바꾼다 from torch.utils.model_zoo import load_url as load_state_dict_from_url 2023. 7. 16.
728x90