Torch——错误集锦

1、matio

错误详细信息:

/home/victoria/torch/install/share/lua/5.1/trepl/init.lua:389: /home/victoria/torch/install/share/lua/5.1/trepl/init.lua:389: /home/victoria/torch/install/share/lua/5.1/matio/ffi.lua:24: Could not find libmatio. Please make sure that you installd MatIO and you have the shared libraries (libmatio.so or libmatio.dylib) in your library path

解决
matio的安装方式:

sudo apt-get install libmatio2
luarocks install matio

2、cuda invalid device ordinal

错误详细信息:

/torch/install/bin/luajit: neuralstyle_seg.lua:49: cuda runtime error (10) : invalid device ordinal at /home/victoria/torch/extra/cutorch/init.c:734

解决
检查程序中GPU数量及索引是否符合自己的实际情况。

3、Couldn’t load .caffemodel

详细错误信息:
Couldn't load models/VGG_ILSVRC_19_layers.caffemodel
/home/spinda/workbench/torch/install/bin/luajit: neural_style.lua:60: attempt to index a nil value
stack traceback:
    neural_style.lua:60: in function 'main'
    neural_style.lua:441: in main chunk
    [C]: in function 'dofile'
    ...ench/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x00405ea0

解决
检查.caffemodel文件是否损坏。

4、out of memory

详细错误信息:

/torch/extra/cutorch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory
/home/victoria/torch/install/bin/luajit: cuda runtime error (2) : out of memory at /home/victoria/torch/extra/cutorch/lib/THC/generic/THCStorage.cu:66

解决
这是因为GPU内存不够用。用小一点的图片作为输入或者用小点的网络。

你可能感兴趣的:(深度学习框架Torch)