Programming/Python 3

[PyTorch][에러 해결] Solving problem of GPU memory: ‘torch.utils.checkpoint’

https://pytorch.org/docs/stable/checkpoint.html torch.utils.checkpoint — PyTorch 1.13 documentation Shortcuts pytorch.org 많은 수의 파라미터를 가지는 크기가 큰 딥러닝 모델의 경우, batch를 1로 설정하더라도 'out of memory'를 만나게 될 수 있다. 나의 경우, Transformer backbone을 사용하는 VSR 모델에 대한 실험을 해보려하니 48GB 메모리를 가지는 Quadro RTX 8000 GPU로도 실험이 불가능하였다. GPU를 활용한 실험을 할 때 이러한 메모리 제한 문제는 'torch.utils.checkpoint'로 해결 할 수 있다. tutorial을 보면, 아래와 같이 쓰여있..

Programming/Python 2023.03.07

[PyCharm][에러 해결] 디버깅 할 때 "Collecting data..." 라는 메세지만 뜨고 값을 볼 수 없을 때

본 글은 아래 링크를 참고하였다. https://stackoverflow.com/questions/39371676/debugger-times-out-at-collecting-data Debugger times out at "Collecting data..." I am debugging a Python (3.5) program with PyCharm (PyCharm Community Edition 2016.2.2 ; Build #PC-162.1812.1, built on August 16, 2016 ; JRE: 1.8.0_76-release-b216 x86 ; JVM: OpenJDK Server VM by stackoverflow.com PyCharm으로 디버깅을 할 때, 각각의 값이 "Collecting..

Programming/Python 2022.05.09

[PyTorch][에러 해결] RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [32]], which is output 0 of SelectBackward, is at version 165; expected version 164 instead. H..

CUDA 11.1 Pytorch 1.8.0 GCN Layer 사이에 Attention mechanism을 구현하는 도중 아래와 같은 에러가 발생했다. RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [32]], which is output 0 of SelectBackward, is at version 165; expected version 164 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradien..

Programming/Python 2021.10.19