我想用TensorFlow发球我安装了TensorFlow服务,使用these指令。
当我试图在python代码中使用这一行时

from tensorflow_serving.session_bundle import exporter

我有这个问题
>>> from tensorflow_serving.session_bundle import exporter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named tensorflow_serving.session_bundle

为什么我会有这个问题我是否缺少构建tensorflow以包含此模块的内容?
您好,在我的设置中,World TensorFlow应用程序运行良好。
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))

最佳答案

花了无数个小时后,我终于找到了解决办法。
当我换线的时候

from tensorflow_serving.session_bundle import exporter


from tensorflow.contrib.session_bundle import exporter

tf开发人员似乎决定更改他们在源树中的session_bundle包位置。

10-04 15:28
查看更多