MCPcopy Create free account
hub / github.com/Tencent/TNN / LoadCaffeModel

Function LoadCaffeModel

tools/caffe2onnx/src/load_save_model.py:7–16  ·  view source on GitHub ↗
(net_path, model_path)

Source from the content-addressed store, hash-verified

5
6
7def LoadCaffeModel(net_path, model_path):
8 # read prototxt
9 net = caffe_upsample_pb2.NetParameter()
10 text_format.Merge(open(net_path).read(), net)
11 # read caffemodel
12 model = caffe_upsample_pb2.NetParameter()
13 f = open(model_path, 'rb')
14 model.ParseFromString(f.read())
15 f.close()
16 return net, model
17
18
19def LoadOnnxModel(onnx_path):

Callers 1

mainFunction · 0.90

Calls 1

readMethod · 0.80

Tested by

no test coverage detected