Tensorflow Serving - Not found: Op type not registered 'GatherTree'

tensorflow

#1

Em chào mọi người, Em có serving tensowflow model và gặp lỗi, 2 có search tìm cách fix mấy ngày rồi mà chưa được, nên em post lên đây nhờ các anh cho em xin gợi ý hoặc cách giải quyết ạ!

I. Em dùng http://opennmt.net/OpenNMT-tf/quickstart.html để train model.

II. Serving model theo các bước sau:

  1. Create docker image with:

docker build --pull -t $USER/tensorflow-serving-devel -f tensorflow_serving/tools/docker/Dockerfile.devel .

  1. Run docker container:

docker run --name=tf_container -it $USER/tensorflow-serving-devel

  1. Serving the model:

tensorflow_model_server --port=9000 --model_name=model_name --model_base_path=/model_file &> result_log &

III.Kết quả result_log file content:

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.}, } ```

Nhờ mọi người xem giúp em. Em cảm ơn ạ!