def get_netparameter(model): with open(model) as f: net = cp.NetParameter() pb.text_format.Parse(f.read(), net) return net