To share our trained tensorflow networks, we freeze the graph into a .pb file. We also create an xml file with some metadata such as the input tensors and output tensors, type of pre-processing to apply, training data information etc. The models are then served using Java or C# by loading the graph and evaluating the tensors etc.
To make sharing easier, I would like to include this xml data somewhere in the .pb file. Is there any way to do this? One idea would be to have it as a tf.Constant, but I don't see how I could connect it to the normal graph.
Note this is using freeze_graph.py. Is the new SavedModel format more suitable?
from Add metadata to tensorflow frozen graph pb
No comments:
Post a Comment