有人可以提供顯示如何執行上述操作的鏈接嗎?我嘗試了所有相關的地方,但我找不到這個程序。如果我只是按照TF網站上的描述安裝TF for Mac,那麼默認情況下是否會爲我提供分佈式版本?在Mac上安裝分佈式張量流程
---安裝TF的GPU版本,並在答案中給出的測試腳本---後
(tensorflow) acbc32a44fc1:~ z001jly$ python test.py
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.1.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.dylib locally
Traceback (most recent call last):
File "test.py", line 2, in <module>
import tensorflow as tf
File "/Users/z001jly/anaconda/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/Users/z001jly/anaconda/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Users/z001jly/anaconda/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/Users/z001jly/anaconda/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: dlopen(/Users/z001jly/anaconda/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: @rpath/libcudart.7.5.dylib
Referenced from: /Users/z001jly/anaconda/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so
Reason: image not found
腳本運行成功,如果我有TF的CPU版本使用。
如果你嘗試使用純CPU的二進制文件,該怎麼辦? (導出TF_BINARY_URL = https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.10.0-py2-none-any.whl) –
好的,我Google搜索並找出了符號鏈接問題。所以,安裝是固定的。現在就試試你的腳本。謝謝。 – user1274878