@zhupijuan_lkl When I run one of the tests in caffe test_forward.py, it reports an error from protobuf. I know it is not TVM’s issue, it seems the model is too large(alexnet.caffemodel is 233M in my side ) really appreciate if you can give me some hint. I am curious why it is OK in CI, I used the same script docker/install/ubuntu_install_caffe.sh to install the caffe
tvm/tests/python/frontend/caffe/test_forward.py:816: in _test_alexnet
_test_network(data_process, proto_file, blob_file)
tvm/tests/python/frontend/caffe/test_forward.py:261: in _test_network
tvm_out = _run_tvm(data, proto_file, blob_file)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = array([[[[ 54.060997 , 112.061 , -82.939 , ..., 37.060997 ,
-69.939 , -78.939 ],
... [ 54.32 , 55.32 , 126.32 , ..., -32.68 ,
-59.68 , -8.68 ]]]], dtype=float32)
proto_file = '/root/.tvm_test_data/model/alexnet.prototxt', blob_file = '/root/.tvm_test_data/model/alexnet.caffemodel'
def _run_tvm(data, proto_file, blob_file):
""" Run caffe model by TVM according to .caffemodel and .prototxt"""
init_net = pb.NetParameter()
predict_net = pb.NetParameter()
# load model
with open(proto_file, "r") as f:
text_format.Merge(f.read(), predict_net)
# load blob
with open(blob_file, "rb") as f:
> init_net.ParseFromString(f.read())
E google.protobuf.message.DecodeError: Error parsing message
tvm/tests/python/frontend/caffe/test_forward.py:187: DecodeError
---------------------------------------------------------------------------------------------- Captured stdout call -----------------------------------------------------------------------------------------------
File /root/.tvm_test_data/model/alexnet.prototxt exists, skip.
File /root/.tvm_test_data/model/alexnet.caffemodel exists, skip.
---------------------------------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------------------------------
[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.