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