>>> import tensorflow as tf
>>> hello = tf.constant("hello TensorFlow!")
>>> sess=tf.Session()
2020-07-24 08:28:31.574800: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1
2020-07-24 08:28:32.014403: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:895] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-07-24 08:28:32.014956: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1105] Found device 0 with properties:
name: GeForce GT 730 major: 3 minor: 5 memoryClockRate(GHz): 0.9015
pciBusID: 0000:05:00.0
totalMemory: 1.95GiB freeMemory: 1.51GiB
2020-07-24 08:28:32.015043: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1195] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GT 730, pci bus id: 0000:05:00.0, compute capability: 3.5)
>>> print (sess.run(hello))
b'hello TensorFlow!'
>>> tf.test.gpu_device_name()
2020-07-24 08:31:26.119168: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1195] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GT 730, pci bus id: 0000:05:00.0, compute capability: 3.5)
'/device:GPU:0'
Partager