728x90
Lua 로 개발된 deep learning 프레임워크를 사용하다 보면 아래와 같은 not enout memory 에러가 발생하는 경우가 있다.
PANIC: unprotected error in call to Lua API (not enough memory)
이런 에러가 발생하는 경우 제일 먼저 현재 설치된 Lua 버전이 LuaJIT 인지 확인해본다. LuaJIT 이라면, 코드상의 문제라기 보단 LuaJIT 의 memory issue 일 가능성이 높다.
his is a LuaJIT memory issue. The total memory of Lua objects (tables, strings) is limited to about 2GB.
이를 해결하기 위해서는 Lua52 로 설치하면 해결 된다. 아래의 명령어는 torch 에서 Lua52 를 설치하는 명령어이다.
cd ~/torch
cd ~/torch; bash install-deps;
./clean.sh
TORCH_LUA_VERSION=LUA52 ./install.sh
이렇게 Lua52 로 설치를하면 LuaJIT 의 2GB 메모리 제한이 풀린다. :)
'개발' 카테고리의 다른 글
라즈베리 파이 온도 확인하기 (0) | 2020.06.01 |
---|---|
Colaboratory 의 GPU 를 이용해 Machine Learning 을 해보자! (0) | 2020.06.01 |
torch cuda9 install error 해결 (0) | 2020.06.01 |
Apt Update Hash Sum mismatch : Ubuntu 18.04 Error Tip : Some index files failed to download. They have been ignored, or old ones used instead. (0) | 2020.05.30 |
Ubunutu 에서 touchpad 제스쳐 사용하기 (0) | 2020.05.30 |