Tensorflow: Retrieving serving signatures from an exported model

Simple question, but it took me many hours of digging into the code to figure out :-(. Someone should have added a document or something.

Basically, just import the meta graph, then unpack the protobuf object from serving_signatures collection. I really don’t understand why it is not added to signature def. Anyway, later you can just call read_serving_signature(path/to/export.meta) to retrieve the exported signatures. It will be very helpful if you want to implement a generic serving interface for tensorflow.

I also made a gist here for reference.

 

One thought on “Tensorflow: Retrieving serving signatures from an exported model

  1. Pingback: Tensorflow: exporting model for serving | Bao's Blog

Leave a Reply

Your email address will not be published. Required fields are marked *