Programming 7

[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

[LaTeX][에러 해결] Package hyperref Warning:~~~, Underfull \hbox ~~~, Overfull \hbox ~~~

본 글에서 활용한 환경은 overleaf 웹사이트이며, https://www.overleaf.com/ Overleaf, Online LaTeX Editor An online LaTeX editor that’s easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more. www.overleaf.com 에러 해결을 위해 아래 글들을 참고하였다. https://tex.stackexchange.com/questions/138/what-are-underfull-hboxes-and-vboxes-and-how-can-i-get-rid-of-them What are underfull..

Programming/ETC 2022.08.10

[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

[구현] React-Native 프로젝트 Expo CLI 빌드 환경에서 React Native CLI 환경으로 변경하는 방법

윈도우에서 react-native로 앱 개발 하는 방법으로 Expo CLI와 React Native CLI가 있다. Expo는 간편하게 빌드를 해서 사용할 수 있어서 이 방법으로 기존에는 진행을 해왔다. 하지만, 실제 안드로이드 SDK로 Release 시키기 위해서는 React Native CLI 방식 환경 구축이 필요하다. 본 환경 구축을 위해 아래 글을 참고하였다. https://dev-yakuza.posstree.com/ko/react-native/install-on-windows/ 윈도우(Windows)에 react native 개발 환경 구축하기 react-native로 앱을 개발하기 위해 윈도우(Windows)에 개발 환경을 구축해 보고, react-native로 생성한 프로젝트가 잘 동작하는..

[구현] 2020년 3월 기준 React-Native 앱 빌드 툴 Expo 버전업 관련 문제 해결

본 글에서는 2020년 3월 기준 React-Native 앱 빌드 툴 Expo-cli 의 버전업과 관련해 기존 프로젝트 빌드 에러가 나는 경우 해결 방법을 정리하였다. 1) node_modules 폴더 내 데이터 모두 삭제 2) 프로젝트 루트 디렉토리에서 'npm install' 이 과정을 거치면, 비어있던 node_modules 폴더에 모듈 설치가 완료된다. 3) 하지만, 다시 'expo start --tunnel 해봤을 때 여전히 에러가 발생 4) metro-config 파일 수정 \node_modules\metro-config\src\defaults\blacklist.js 하지만, 위 과정 이후에도 추가 에러가 발생한다. 5) 추가 해결 순서 babel.config 파일과 package-lock.j..

[구현] 2019년 7월 기준 React-Native 앱 빌드 툴 Expo 버전업 관련 문제 해결

본 글은 2018년에 구축된 React-Native 프로젝트를 Expo 로 빌드하는 환경에서 Expo의 버전업으로 인한 에러 해결에 대해 정리해 놓은 글이므로 2022년 현재 시점과는 맞지 않다. 이 점 참고하길 바란다. 2019년 7월 기준, Expo XDE 지원이 중단되고, Expo-cli 를 통해 빌드하도록 변경되었다. 따라서 Expo-cli 를 다운로드 하고 환경 설정을 해야 한다. 이 과정에서 기존 프로젝트의 환경 설정, 모듈 버전, 코드 내의 모듈 사용 문법 등이 맞지 않아 에러 발생하였고 이를 해결하기 위한 리스트를 아래에 정리하였다. • app.json 파일에서의 sdkVersion 을 33.0.0으로 변경. • package.json 파일에서의 expo, react-native 를 33...

[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