Torch - Ubuntu安装torch-hdf5,loadcaffe,matio和nccl

前端之家收集整理的这篇文章主要介绍了Torch - Ubuntu安装torch-hdf5,loadcaffe,matio和nccl前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

torch-hdf5

sudo apt-get install libhdf5-serial-dev hdf5-tools 
git clone https://github.com/deepmind/torch-hdf5 
cd torch-hdf5 
sudo luarocks make hdf5-0-0.rockspec LIBHDF5_LIBDIR=”/usr/lib/x86_64-Linux-gnu/

loadcaffe

git clone https://github.com/szagoruyko/loadcaffe.git 
cd loadcaffe 
sudo apt-get install libprotobuf-dev protobuf-compiler 
luarocks install loadcaffe

matio

luarocks install matio

matio 出现的详细错误解决

错误

/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/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

解决方案:

sudo apt-get install libmatio2
luarocks install matio

nccl

采用 multi-GPUs 训练时速度更高:

git clone https://github.com/NVIDIA/nccl.git
cd nccl
make 
make install
luarocks install nccl

如果出现 libnccl.so not found,在 ~/.bashrc 中设置 LD_LIBRARY_PATH.

猜你在找的Ubuntu相关文章