Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

neilisaac / torch   python

Repository URL to install this package:

Version: 1.8.0 

/ python / predictor / serde.py

## @package serde
# Module caffe2.python.predictor.serde






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