我已经从源代码、CUDA 8.0、python 3.5、Ubuntu 16.04 构建了 Tensorflow,目标是 NVIDIA 1070,它运行良好。
Python 3.5.2(默认,2016 年 7 月 5 日,12:43:10)[GCC 5.4.0 20160609] 在 linux 上键入“帮助”、“版权”、“信用”或“许可证”以获取更多信息。
import tensorflow as tf I tensorflow/stream_executor/dso_loader.cc:108] 本地成功打开 CUDA 库 libcublas.so.8.0 我 tensorflow/stream_executor/dso_loader.cc:108] 本地成功打开 CUDA 库 libcudnn.so.5 我 tensorflow/stream_executor /dso_loader.cc:108] 本地成功打开 CUDA 库 libcufft.so.8.0 我 tensorflow/stream_executor/dso_loader.cc:108] 本地成功打开 CUDA 库 libcuda.so.1 我 tensorflow/stream_executor/dso_loader.cc:108] 成功在本地打开 CUDA 库 libcurand.so.8.0
但是,当尝试从源代码构建 tensorflow_serving 时,它总是会失败:
块引用文件“/home/alitz/.cache/bazel/_bazel_alitz/7318bb8e61ee048c2d10c9f8fb67c783/execroot/serving/bazel-out/host/bin/external/org_tensorflow/tensorflow/contrib/session_bundle/example/export_half_plus_two.runfiles/tf_serving/../ org_tensorflow/tensorflow/contrib/session_bundle/example/export_half_plus_two.py”,第 115 行,在 tf.app.run() 文件中“/home/alitz/.cache/bazel/_bazel_alitz/7318bb8e61ee048c2d10c9f8fb67c783/execroot/serving/bazel-out/ host/bin/external/org_tensorflow/tensorflow/contrib/session_bundle/example/export_half_plus_two.runfiles/org_tensorflow/tensorflow/python/platform/app.py”,第 30 行,运行 sys.exit(main(sys.argv)) 文件“/家/阿利兹/。缓存/bazel/_bazel_alitz/7318bb8e61ee048c2d10c9f8fb67c783/execroot/serving/bazel-out/host/bin/external/org_tensorflow/tensorflow/contrib/session_bundle/example/export_half_plus_two.runfiles/tf_serving/../org_tensorflow/tensorflow/contrib/session_bundle/example /export_half_plus_two.py”,第 111 行,在主 Export() 文件中“/home/alitz/.cache/bazel/_bazel_alitz/7318bb8e61ee048c2d10c9f8fb67c783/execroot/serving/bazel-out/host/bin/external/org_tensorflow/tensorflow/contrib/ session_bundle/example/export_half_plus_two.runfiles/tf_serving/../org_tensorflow/tensorflow/contrib/session_bundle/example/export_half_plus_two.py”,第 106 行,在 Export assets_callback=CopyAssets) 文件“/home/alitz/.缓存/bazel/_bazel_alitz/7318bb8e61ee048c2d10c9f8fb67c783/execroot/serving/bazel-out/host/bin/external/org_tensorflow/tensorflow/contrib/session_bundle/example/export_half_plus_two.runfiles/org_tensorflow/tensorflow/contrib/session_bundle/exporter.py”,行202, init graph_any_buf.Pack(copy) AttributeError: 'Any' object has no attribute 'Pack' Blockquote
任何帮助将不胜感激,否则我将辞去工作并开始施工。
谢谢。