1、安装相关依赖包
yum install python-devel libffi-devel openssl-devel
2 、下载pip
wget https://bootstrap.pypa.io/get-pip.py
3 、安装pip
python get-pip.py
4、安装tensorflow1.0版本
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl
5、实验>>import tensorflow as tf
>> tf.InteractiveSession()
>>a=tf.zeros((2,2));b=tf.ones((2,2))
>>tf.reduce_sum(b,reduction_indices=1).eval()
>>a.get_shape()
>>tf.reshape(a,(1,4)).eval()
>>na=np.zeros((2,2))
>>print na
本文详细介绍了如何在Linux环境下安装TensorFlow 1.0,包括安装必要的依赖包、下载并安装pip工具,以及通过pip安装特定版本的TensorFlow。此外,还提供了简单的TensorFlow实验代码示例,帮助读者快速上手。
1323

被折叠的 条评论
为什么被折叠?



