HDU 2057 A + B Again(16进制加法)
1228
2022-08-23
ubuntu16.04 tensorflow-gpu版本安装好后,简单的检测代码
安装好cuda和 cudnn以后,我们用pip命令安装tensorflow-gpu版本(ubuntu 16.04):
sudo pip install tensorflow-gpu
如果是安装的tensorflow 1.3版本,那就要注意了,需要安装cuda 8.0和cudnn 6.0(重要),否则会报错:
xyxt@xyxt-System-Product-Name:~/Downloads/shangyixing$ pythonPython 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import tensorflowTraceback (most recent call last): File "
我们在检测tensorflow-gpu版本是否安装好,需要运行一个python代码进行测试,在python终端输入:
import tensorflow >>> import tensorflow as tf>>> matrix1 = tf.constant([[3., 3.]]) >>> matrix2 = tf.constant([[2.],[2.]]) >>> product = tf.matmul(matrix1, matrix2) >>> sess = tf.Session()
输出的信息,如果有你的显卡信息,则说明你的tensorflow GPU 版本安装成功了
2017-10-10 17:44:46.428528: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.2017-10-10 17:44:46.428544: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.2017-10-10 17:44:46.428549: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.2017-10-10 17:44:46.428553: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.2017-10-10 17:44:46.428557: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.2017-10-10 17:44:46.547766: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero2017-10-10 17:44:46.548007: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties: name: GeForce GTX 1070major: 6 minor: 1 memoryClockRate (GHz) 1.683pciBusID 0000:01:00.0Total memory: 7.92GiBFree memory: 7.43GiB2017-10-10 17:44:46.548020: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0 2017-10-10 17:44:46.548024: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0: Y 2017-10-10 17:44:46.548029: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce gtX 1070, pci bus id: 0000:01:00.0)
参考文献
[1].【报错】ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~