如何在不使用 bazel 的情况下执行 TensorFlow 服务示例 mnist_export?
How to execute TensorFlow serving example mnist_export without using bazel?
我已经安装了 TensorFlow 的所有先决条件 explained here
当我尝试在我的 Ubuntu 16.04 机器中使用以下行 运行 默认 mnist 示例时:
python mnist_export.py --training_iteration=1000 --export_version=1 export_models
我收到以下错误:
Traceback (most recent call last):
File "mnist_export.py", line 40, in <module>
from tensorflow_serving.example import mnist_input_data
ImportError: No module named tensorflow_serving.example
那个代码是available here。
然而,当我使用 bazel 构建如下时,它完美地工作:
bazel-bin/tensorflow_serving/example/mnist_export --training_iteration=1000 --export_version=1 export_models
此问题已通过更改以下行解决:
from tensorflow_serving.example import mnist_input_data
到这一行:
from tensorflow.contrib.learn.python.learn.datasets import mnist as mnist_input_data
这个问题是discussed here。
我已经安装了 TensorFlow 的所有先决条件 explained here
当我尝试在我的 Ubuntu 16.04 机器中使用以下行 运行 默认 mnist 示例时:
python mnist_export.py --training_iteration=1000 --export_version=1 export_models
我收到以下错误:
Traceback (most recent call last):
File "mnist_export.py", line 40, in <module>
from tensorflow_serving.example import mnist_input_data
ImportError: No module named tensorflow_serving.example
那个代码是available here。
然而,当我使用 bazel 构建如下时,它完美地工作:
bazel-bin/tensorflow_serving/example/mnist_export --training_iteration=1000 --export_version=1 export_models
此问题已通过更改以下行解决:
from tensorflow_serving.example import mnist_input_data
到这一行:
from tensorflow.contrib.learn.python.learn.datasets import mnist as mnist_input_data
这个问题是discussed here。