tensorflow website에 언급 된 아나콘다 환경을 사용하여 텐포 흐름을 설치했으며 파이썬 설치 경로를 변경 한 후 변경되었습니다.방법 : GPU 지원을 사용하여 Conda의 Jupyter Notebook에서 TensorFlow를 가져 오시겠습니까?
[email protected]:~$ which python
/home/dennis/anaconda2/bin/python
그리고 Jupyter가 설치되었습니다. 나는 내가 쥬피터에서 똑같이 할 수있는 콘도 환경에서 텐 토류 플로우를 가져오고 사용할 수 있다면 그것을 가정했다. 내 시스템에 tensorflow 가져 오기
위의 가져 오기가 있었다으로
[email protected]:~$ python
Python 2.7.11 |Anaconda 4.1.0 (64-bit)| (default, Jun 15 2016, 15:21:30)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tensorflow
>>> exit()
이 CONDA 환경
[email protected]:~$ source activate tensorflow
prepending /home/dennis/anaconda2/envs/tensorflow/bin to PATH
(tensorflow) [email protected]:~$ python
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import tensorflow as tf
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:102] Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH: /usr/local/cuda-7.5/lib64
I tensorflow/stream_executor/cuda/cuda_dnn.cc:2092] Unable to load cuDNN DSO
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
에 tensorflow 가져 오기 (환경을 활성화하지 않고) -하지만 그 사건이 아니었다 성공 나는 주피터 (환경 내에서 jupyter를 시작했다)에서 같은 일을 시도했지만 성공했다. 다음과 같은 가져 오기 오류 -
ImportError Traceback (most recent call last)
<ipython-input-1-41389fad42b5> in <module>()
----> 1 import tensorflow as tf
ImportError: No module named tensorflow
제 생각 엔 노트북은 conda 환경에서 실행되지 않습니다. 그래서, 제가 어떻게 똑같이하도록 강요합니까?
또는 당신은 단지 jupyter에
편집 # 1 tensorflow 가져 오는 방법에 대한 세부 사항을 나에게 제공 할 수 있습니다 conda install -c jjhelmus tensorflow=0.9.0
명령을 사용하여 아나콘다 설치에
내가 성공적으로 설치 한 tensorflow합니다. [출처 : conda.anaconda.org/jjhelmus]
그러나 하나가 아래에 따라서 오류
with tf.Session() as sess:
with tf.device("/gpu:0"): #GPUs are not enabled on the system so it throws an error
matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.],[2.]])
product = tf.matmul(matrix1, matrix2)
result = sess.run([product])
print result
를 반환 같은이가 GPU를 지원하므로 코드를 비활성화, 어떻게 GPU 지원을 활성화합니까? GPU를 지원하는 condor에 tensorflow를 설치하기위한 대안이 있습니까?
편집 # 2 : 소스가 대상 GPU 위해 만들어진 경우에만 그것은 here 언급
, 즉 GPU 지원이 가능합니다. 이것이 사실이라면을 수행 할 수있는 방법에 대한 세부 정보를 제공하여 GPU 사용이 가능한 텐서 플로우 설치가되도록하십시오. 대한 GPU와
어떤 플랫폼을 사용하고 계십니까? Linux를 사용하고 있다면 google이 아나콘다로 아주 쉽게 사용할 수있는 미리 빌드 된 바이너리를 만들었습니다. https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#anaconda-installation – user2561747