def parseProtoString(s): from google.protobuf import text_format proto_net = pb.NetParameter() text_format.Merge(s, proto_net) return proto_net