luajit: not enough memory

Error running code:

luajit: not enough memory

The reason for the search seems to be that LuaJIT limit of 2GB,

The solution is to install LUA5.1. Since LuaJIT 2.1 is the default when installing Torch, the /install command allows you to install LUA5.1 in this step, with the following commands:

TORCH_LUA_VERSION=LUA51 ./install.sh

When the installation is complete, re-run the code and there will be no errors.

Read More: