配置rnnlib(刚刚配置完成)

来源:互联网 发布:守望先锋录制软件 编辑:程序博客网 时间:2024/05/09 19:51

rnnlib是一个rnn的库,可以方便的进行rnn的学习和调用。网上关于rnnlib的资源比较少,因而记录下来方便各位的学习。

参考了博客http://blog.csdn.net/u012426662/article/details/41694611和http://blog.csdn.net/co_dr/article/details/41315455,并访问了相关的论坛http://sourceforge.net/projects/rnnl/forums/forum/1183966。做如下的总结。


在编译rnnlib之前,需要配置相关的环境。在ubuntu环境下,可以比较方便的通过sudo apt-get install 命令依次进行安装  

1.GCC 2.automake 3.netcdf-bin 4.python-netcdf 5.libboost1.48-all-dev

虽然作者对于libboost库的要求是1.39以上,但还是建议配置尽量高版本,否则在编译rnn的时候会报一些奇怪的错误


需要单独安装netcdf-C和netcdf-c++.因为在配置后者的时候,需要netcdf-c支持netcdf-4,因而在配置netcdf-c的时候还需要配置 zlib和hdf5.另外由于版本的需要,在下载netcdf-c++时,建议选择4.2版本。netcdf的官网是http://www.unidata.ucar.edu/downloads/netcdf/index.jsp,可以在上面选择下载。

安装netcdf时参考了如下两篇博客,解决hdf5和netcdf-4的安装问题

http://blog.csdn.net/skyvoice2/article/details/7455527
http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11648.html

配置netcdf-c时需要执行

export CPPFLAGS=-I/your hdf5 path/include

export LDFLAGS=-l?/your hdf5 path/lib

./configure --enable-shared=yes --enable-netcdf-4=yes

make check  install

如果之前没有指定具体的路径 那么默认的安装路径为 /usr/local/include


netcdf-c++选择4.2版本,否则在编译rnnlib时会报一个找不到netcdfcpp.h的错

配置netcdf-c++时需要执行

export CPPFLAGS="-I /usr/local/netcdf/include"export  DYLDFLAGS="-L /usr/local/netcdf/lib"export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
./configure

make check install


最后就是编译rnnlib 这一步需要到rnnlib文件夹下 执行./configue

编译前建议修改Helper.cpp,参考http://sourceforge.net/p/rnnl/discussion/1183966/thread/3868057e/


然后结束~配置了整整一天~


0 0
原创粉丝点击