gpt4 book ai didi

tensorflow - 如何从源代码更新 Tensorflow

转载 作者:行者123 更新时间:2023-12-03 09:48:35 24 4
gpt4 key购买 nike

我通过 git clone 从源代码安装了最新的 Tensorflow 0.5.0
并想更新到 Tensorflow 0.6.0

git pull
./configure
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer

但是 /usr/lib/python2.7/site-packages目录下的Tensorflow库还是0.5.0版本
"pip show tensorflow" 结果中的版本也是 0.5.0

最佳答案

要从源代码安装 TensorFlow 库,您需要 build a PIP package and install it 。步骤如下:

$ git pull
$ ./configure

$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
# ...or, with GPU support
$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

# The name of the .whl file will depend on your platform.
$ pip install /tmp/tensorflow_pkg/tensorflow-0.6.0-cp27-none-linux_x86_64.whl

关于tensorflow - 如何从源代码更新 Tensorflow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34239537/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com