code: def read_prototxt(fname):
      
      proto = caffe_pb2.NetParameter()
      with open(fname, 'r') as f:
          text_format.Merge(str(f.read()), proto)
      return proto
docs: Return a caffe_pb2.NetParameter object that defined in a prototxt file