pytorch/caffe2/python/predictor/serde.py
Aaron Markham b93a7b134a doxygen configs and updated python files to inc. doxygen tags (#266)
* updated ubuntu instructions

* updated ubuntu notes and troubleshooting

* updated tutorials using local files

* added doxygen python blocks for docs generation

* doxygen related files for generating docs
2017-04-14 16:30:33 -07:00

16 lines
462 B
Python

## @package serde
# Module caffe2.python.predictor.serde
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
def serialize_protobuf_struct(protobuf_struct):
return protobuf_struct.SerializeToString()
def deserialize_protobuf_struct(serialized_protobuf, struct_type):
deser = struct_type()
deser.ParseFromString(serialized_protobuf)
return deser