(net_path, model_path)
| 5 | |
| 6 | |
| 7 | def 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 | |
| 19 | def LoadOnnxModel(onnx_path): |