Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x Tensorflow未在PyCharm中的GPU上运行_Python 3.x_Tensorflow_Pycharm_Nvidia - Fatal编程技术网

Python 3.x Tensorflow未在PyCharm中的GPU上运行

Python 3.x Tensorflow未在PyCharm中的GPU上运行,python-3.x,tensorflow,pycharm,nvidia,Python 3.x,Tensorflow,Pycharm,Nvidia,我安装了Tensorflow GPU,我可以在Ubuntu18.04的终端上看到它 >>> from tensorflow.python.client import device_lib >>> print(device_lib.list_local_devices()) 结果是: 2018-08-21 16:34:49.867482: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Addi

我安装了Tensorflow GPU,我可以在Ubuntu18.04的终端上看到它

>>> from tensorflow.python.client import device_lib
>>> print(device_lib.list_local_devices())
结果是:

2018-08-21 16:34:49.867482: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0
2018-08-21 16:34:49.867602: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-08-21 16:34:49.867627: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971]      0 
2018-08-21 16:34:49.867650: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0:   N 
2018-08-21 16:34:49.867979: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/device:GPU:0 with 6863 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 10929943929948782169
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 7196478669
locality {
  bus_id: 1
  links {
  }
}
incarnation: 1784950594023049308
physical_device_desc: "device: 0, name: GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1"
]
但当我在PyCharm中运行它时

/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 12856835725849494278
]
2018-08-21 16:38:54.238307: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

Process finished with exit code 0

我是新手,所以非常感谢您的帮助!谢谢。我已经修好了。我在PyCharm中更换了项目解释器,现在它适合我了。

阅读这两个链接。他们声称这是良性的@MohanRadhakrishnan我读过它,但不明白它对我有什么帮助。它似乎是一个警告。你觉得有什么问题吗?PyCharm使用您指定的python。@MohanRadhakrishnan是的,没有问题,但我不明白为什么在jupyter或terminal中我可以使用GPU,而在PyCharm中不能。