您的位置:首页 > 理论基础 > 计算机网络

创新实训——阿里云搭建神经网络模型开发环境

2018-08-25 15:49 411 查看

1.安装python

默认python版本是 2.7.5,所以不需要安装

2.安装lua5.1

[code]wget http://www.lua.org/ftp/lua-5.1.tar.gz

tar -xzvf lua-5.1.tar.gz

cd lua-5.1

make linux

make install

3.安装luarocks(不必须,因为装torch会自动安装luarocks)

[code]wget http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2.tar.gz

tar -xzvf luarocks-2.2.2.tar.gz

cd luarocks-2.2.2

./configure --prefix=/usr/local/luarocks-2.2.2

make build

make install

4.安装Torch7

如果之前安装过Torch7, 想重新安装, 按照如下方法clean掉old versions:

> curl -s https://raw.github.com/torch/ezinstall/master/clean-old.sh | bash

如果之前没有安装过Torch7,或者clean掉old versions后,接下来, 按照执行如下语句安装:

> curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-all | bash

安装Torch的其他相关的package, 只需要执行如下语句即可:

> luarocks install [packagename]

进入torch的方法:

> th

退出torch的两种方法:

> os.exit() 
或者直接CTRL + C

5.安装TensorFlow

[code]#pip install  tensorflow 
#python
>>>import tensorflow as tf
>>>tf.__version__

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: