TensorFlow GPU版本安装(3):Anoconda版本安装

来源:互联网 发布:模拟板胡软件 编辑:程序博客网 时间:2024/06/05 08:22

一 安装

已经按照tensorflow的推荐安装cuda8.0和cudnn5.1插件,下载anaconda安装文件、tensorflow gpu版本和其他python插件。使用anaconda安装原因为其本身完美集成了绝大多数常用插件,减少了很多安装麻烦,同时其本身也完美兼容tensorflow,可以在不用更改服务器已安装python版本的情况下,快速安装tensorflow。

1.1 安装conda

Sudo bash .*sh

然后重启:reboot

[root@afmdb03sz ~]# which python

/root/anaconda2/bin/python

1.2 安装tensorflow

使用conda离线安装各种包

 

Conda install –offline *.tar.bz2

同时也可以使用pip命令安装非anaconda插件,比如github上的各种RBM实现。

使用本机原始python:/usr/bin/python

安装插件到原始python:/usr/bin/pip*

二 测试程序

>> import tensorflow as tf

>>> hello = tf.constant('Hello,TensorFlow!')

>>> sess = tf.Session()

2017-08-17 10:36:38.647864: W tensorflow/core/platform/cpu_feature_guard.cc:45]The TensorFlow library wasn't compiled to use SSE4.1 instructions, bu                                                                                       t these are available on your machine and could speed up CPUcomputations.

2017-08-17 10:36:38.647914: Wtensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn'tcompiled to use SSE4.2 instructions, bu                                                                                       t these are available onyour machine and could speed up CPU computations.

2017-08-17 10:36:38.647930: Wtensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn'tcompiled to use AVX instructions, but t                                                                                        heseare available on your machine and could speed up CPU computations.

2017-08-17 10:36:38.647943: Wtensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn'tcompiled to use AVX2 instructions, but                                                                                        these are available on your machine and could speed up CPU computations.

2017-08-17 10:36:38.647955: Wtensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn'tcompiled to use FMA instructions, but t                                                                                       hese are available on your machine and could speed up CPU computations.

2017-08-17 10:36:42.455199: Itensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 withproperties:

name: Tesla K40m

major: 3 minor: 5 memoryClockRate (GHz)0.745

pciBusID 0000:03:00.0

Total memory: 11.17GiB

Free memory: 11.10GiB

2017-08-17 10:36:42.455282: Itensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0

2017-08-17 10:36:42.455301: Itensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0:   Y

2017-08-17 10:36:42.455331: Itensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlowdevice (/gpu:0) -> (device: 0, name: Tesla K                                                                                       40m, pci bus id: 0000:03:00.0)

>>> sess.run(hello

... )

'Hello, TensorFlow!'

>>> a = tf.constant(10)

>>> b = tf.constant(32)

>>> sess.run(a + b)

42

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 微信发视频太慢怎么办 手机微信小视频打不开怎么办 移动客服态度差怎么办 地下城不能下载怎么办 dnf安装文件失败怎么办 dnf安装游戏失败怎么办 电脑提示文件损坏怎么办 手机刷机失灵怎么办 刷机时安装终止怎么办 牛发烧40度怎么办 mac所有程序打不开怎么办 苹果iphonex掉了怎么办 空调送错货安装完怎么办 联想电脑打不开机怎么办 联想电脑开不开机怎么办 笔记本声音没有了怎么办 升级后信号不好怎么办? 金融公司倒闭钱怎么办 海尔冰箱不通电怎么办 小区宽带被垄断怎么办 美术生家里没钱怎么办 skg补水仪堵塞了怎么办 榨汁机不会动了怎么办 电水壶有塑料味怎么办 抽油烟机不转了怎么办 侧吸油烟机滴油怎么办 油烟机触屏失灵怎么办 油烟机主机坏了怎么办 油烟机关不掉怎么办 养生壶功能错乱怎么办 厨房烟道有风声怎么办 真丝衣服皱了怎么办 rar文件不复制怎么办 电饭煲锅盖坏了怎么办 电脑麦有电流怎么办 小孩子igf-1偏低怎么办 烤箱忘记预热了怎么办 原汁机卡住了怎么办 榨汁机拧不下来怎么办 水壶底座进水了怎么办 苹果应用有广告怎么办