Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Message onnx.ModelProto exceeds maximum protobuf size of 2GB: 26972694926 #4

Open
hupreti opened this issue Jul 5, 2023 · 0 comments

Comments

@hupreti
Copy link

hupreti commented Jul 5, 2023

Command used onnx_onnx_opcounter --calculate-macs <path/to/onnx/model>

Traceback (most recent call last):
File "/env/bin/onnx_opcounter", line 8, in
sys.exit(main())
File "/env/lib/python3.8/site-packages/onnx_opcounter/cli.py", line 17, in main
print('Number of MACs in the model: {}'.format(calculate_macs(model)))
File "/env/lib/python3.8/site-packages/onnx_opcounter/onnx_opcounter.py", line 88, in calculate_macs
onnx.save(model, '+all-intermediate.onnx')
File "/env/lib/python3.8/site-packages/onnx/init.py", line 197, in save_model
s = _serialize(proto)
File "/env/lib/python3.8/site-packages/onnx/init.py", line 66, in _serialize
result = proto.SerializeToString()
ValueError: Message onnx.ModelProto exceeds maximum protobuf size of 2GB: 26972694926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant