My question is in relation to protocol buffers. I understand that they serialize structured data. Is there a way to deserialize the data back to the original structured data.
For example, Tensorflow produces a MetaGraph file which stores a TensorFlow GraphDef
as well as associated metadata necessary for running computation in a graph.
I have a metagrpah of an GoogleNet inception network and I would like to deserialize it to see the fields described in the link.
That is a beautiful problem. But log story short as I saw in the code MetaGraph this is possible.
https://www.tensorflow.org/api_guides/python/meta_graph
In order for a Python object to be serialized to and from MetaGraphDef, the Python class must implement to_proto() and from_proto() methods.
This would mean that you need to implement those methods define their properties like proto files and that should work. I never tried it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.