serving icon indicating copy to clipboard operation
serving copied to clipboard

Op type not registered 'NonMaxSuppressionV3'

Open arptejan95 opened this issue 8 years ago • 3 comments

We are trying to use Tensorflow Serving to host our model. We have trained an Object Detection model using Retinanet with Resnet50 in Keras and then Exported in saved_model format as it is required for tensorflow serving using the folowing code.

builder = saved_model_builder.SavedModelBuilder(full_export_path)
signature = predict_signature_def(inputs={"images": model.input},
                                  outputs={"boxes": model.output[0], "scores" : model.output[1], "labels" : model.output[2]})
    with K.get_session() as sess:
        builder.add_meta_graph_and_variables(sess=sess,
                                         tags=[tag_constants.SERVING],
                                         signature_def_map={"predict": signature})
        builder.save()

We are facing an issue while hosting our model using TF Serving. We are getting the following error:

2018-07-24 13:30:06.713480: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: retinanet_OD version: 1} failed: Not found: Op type not registered 'NonMaxSuppressionV3' in binary running on e42a24728025. Make sure the Op and Kernel are registered in the binary running in this process.
2018-07-24 13:30:06.713499: I tensorflow_serving/util/retrier.cc:46] Retrying of Loading servable: {name: retinanet_OD version: 1} exhausted max_num_retries: 5
2018-07-24 13:30:06.713534: I tensorflow_serving/core/loader_harness.cc:154] Encountered an error for servable version {name: retinanet_OD version: 1}: Not found: Op type not registered 'NonMaxSuppressionV3' in binary running on e42a24728025. Make sure the Op and Kernel are registered in the binary running in this process.
2018-07-24 13:30:06.713583: E tensorflow_serving/core/aspired_versions_manager.cc:358] Servable {name: retinanet_OD version: 1} cannot be loaded: Not found: Op type not registered 'NonMaxSuppressionV3' in binary running on e42a24728025. Make sure the Op and Kernel are registered in the binary running in this process.
2018-07-24 13:30:07.010652: F tensorflow_serving/model_servers/main.cc:513] Non-OK-status: ServerCore::Create(std::move(options), &core) status: Unknown: Some servables did not become available: {{name: retinanet_OD version: 1}, }

We are not able to solve this issue. Any help would be appreciated. TIA!

arptejan95 avatar Jul 24 '18 14:07 arptejan95

It looks like this op isn't linked into your TF-Serving binary. You'll need to add the appropriate dependency to the BUILD file and re-build with bazel.

chrisolston avatar Jul 24 '18 17:07 chrisolston

@chrisolston can you suggest us how to add this dependency to the BUILD file?

arptejan95 avatar Jul 25 '18 05:07 arptejan95

Given this isn't a bug, would you mind asking on Stack Overflow? Makes it easier for people to find answers and for issues here to be tracked as bugs and feature requests. You might want to tag bazel and tensorflow as well.

https://stackoverflow.com/questions/tagged/tensorflow-serving

Thanks!

gautamvasudevan avatar Aug 03 '18 17:08 gautamvasudevan