(tfenv) hobbes@hobbes-HP-Pavilion-Notebook:~/tfenv$ python
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
/home/hobbes/tfenv/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
>>> with tf.device('/gpu:0'):
... a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
... b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
... c = tf.matmul(a, b)
...
>>> with tf.Session() as sess:
... print (sess.run(c))
...
2018-05-26 17:39:53.860779: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-05-26 17:39:53.946021: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-05-26 17:39:53.946434: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 960M major: 5 minor: 0 memoryClockRate(GHz): 1.176
pciBusID: 0000:01:00.0
totalMemory: 1.96GiB freeMemory: 1.66GiB
2018-05-26 17:39:53.946450: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-05-26 17:39:54.449040: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-05-26 17:39:54.449064: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0
2018-05-26 17:39:54.449070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N
2018-05-26 17:39:54.449194: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1416 MB memory) -> physical GPU (device: 0, name: GeForce GTX 960M, pci bus id: 0000:01:00.0, compute capability: 5.0)
[[22. 28.]
[49. 64.]]
Правильно, я занимался этим неделями, и я действительно измучен, и поэтому решил обратиться за помощью к кому-нибудь, кому угодно, желающему объяснить мне, почему на Землемои выходные данные возвращаются: 2018-05-26 17: 39: 54.449070: I tenorflow / core / common_runtime / gpu / gpu_device.cc: 942] 0: N с N вместо Y.
Любая помощь любого родабыл бы очень признателен, правда.
Вот мой вывод, когда я набираю nvidia-smi в моем терминале на Ubuntu 18.04
hobbes@hobbes-HP-Pavilion-Notebook:~$ nvidia-smi
Sat May 26 18:23:59 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.24 Driver Version: 396.24 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 960M Off | 00000000:01:00.0 Off | N/A |
| N/A 55C P8 N/A / N/A | 267MiB / 2002MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1286 G /usr/lib/xorg/Xorg 24MiB |
| 0 1464 G /usr/bin/gnome-shell 48MiB |
| 0 1650 G /usr/lib/xorg/Xorg 103MiB |
| 0 1820 G /usr/bin/gnome-shell 87MiB |
+-----------------------------------------------------------------------------+
hobbes@hobbes-HP-Pavilion-Notebook:~$