I have successfully exported the reprocessed InceptionV3 NN as a TensorFlow metagraph. I have successfully read this protobuf in python, but I'm struggling to find a way to export the values ββand offset values ββof each level, which I assume is stored in the protobuf metafactor to recreate nn outside of TensorFlow.
My workflow is this:
Retrain final layer for new categories
Export meta graph tf.train.export_meta_graph(filename='model.meta')
Build python pb2.py using Protoc and meta_graph.proto
Load Protobuf:
import meta_graph_pb2
saved = meta_graph_pb2.CollectionDef()
with open('model.meta', 'rb') as f:
saved.ParseFromString(f.read())
From here I can view most aspects of the graph, for example, node names, etc., but I think that my inexperience makes it difficult to find the right way to access the weight and offset values ββfor each corresponding layer.
source
share