Docker Tensorflow服务-未找到:Op类型未注册';GatherTree';
我只是个新手。在这种情况下,我使用tensorflow模型时遇到问题: I.用这个来训练模型 二,。通过以下步骤为模型提供服务:Docker Tensorflow服务-未找到:Op类型未注册';GatherTree';,docker,tensorflow,tensorflow-serving,opennmt,Docker,Tensorflow,Tensorflow Serving,Opennmt,我只是个新手。在这种情况下,我使用tensorflow模型时遇到问题: I.用这个来训练模型 二,。通过以下步骤为模型提供服务: 使用以下内容创建docker映像: docker build--pull-t$USER/tensorflow-service-devel-f tensorflow\u-service/tools/docker/Dockerfile.devel. 运行docker容器: docker-run--name=tf_-container-it$USER/tensorflow-
docker build--pull-t$USER/tensorflow-service-devel-f tensorflow\u-service/tools/docker/Dockerfile.devel.
docker-run--name=tf_-container-it$USER/tensorflow-service-devel
tensorflow\u model\u server--port=9000--model\u name=model\u name--model\u base\u path=/model\u file&>result\u log&
三、 结果\u日志文件内容:
2019-10-21 02:46:12.840258: I tensorflow_serving/core/loader_harness.cc:155] Encountered an error for servable version {name: ente version: 1569320347}: Not found: Op type not registered 'GatherTree' in binary running on 1b79e5fb3ac4. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2019-10-21 02:46:12.840280: E tensorflow_serving/core/aspired_versions_manager.cc:359] Servable {name: ente version: 1569320347} cannot be loaded: Not found: Op type not registered 'GatherTree' in binary running on 1b79e5fb3ac4. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2019-10-21 02:46:13.664569: I tensorflow_serving/core/basic_manager.cc:280] Unload all remaining servables in the manager.
Failed to start server. Error: Unknown: 1 servable(s) did not become available: {{{name: ente version: 1569320347} due to error: Not found: Op type not registered 'GatherTree' in binary running on 1b79e5fb3ac4. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.}, } ```
I have searched Google and try to update some services, but the problem still here. Anyone have any idea please?
Thanks so much for any suggestions!
随着过渡到TensorFlow 2.0,用于beam搜索的
GatherTree
op目前在TensorFlow服务中不可用
- 如果您使用OpenNMT tf 1.x导出模型,它将使用op
,在TensorFlow服务的最新版本中已从该树中删除。您应该使用TensorFlow服务的早期版本,如1.15.0GatherTree
- 如果您使用OpenNMT tf 2.x导出模型,它将使用op
,目前该工具尚未集成到TensorFlow服务中。这是一个很好的例子。目前有两种解决办法:Addons>GatherTree
- 使用包含此op的自定义服务构建
- 通过使用以下配置导出模型,禁用OpenNMT tf中的波束搜索:
谢谢你的评论!我尝试使用:
docker-pull-tensorflow/service:1.15.0
拉取旧版本,并使用该图像运行一个docker容器:docker-run--name=tf1150-it-tensorflow/service:1.15.0
。但是在这个容器中,tensorflow版本仍然是2.0tensorflow模型服务器:0.0.0+dev.sha.21b257fa tensorflow库:2.0.0
,我尝试使用旧版本:1.14.0和1.13.0。但是当我运行docker时:docker run--name=tf1140-it tensorflow/service:1.14.0
。结果是E tensorflow\u serving/sources/storage\u path/file\u system\u storage\u path\u source.cc:362]文件系统存储路径源遇到文件系统访问错误:找不到可服务模型的基本路径/模型/模型
。我不能运行这个容器。你知道吗?我还在挖。非常感谢你!
params:
beam_width: 1