onnx-simplifier icon indicating copy to clipboard operation
onnx-simplifier copied to clipboard

[BUG] 优化模型后提示doesn't exist or is not accessible

Open luchangli03 opened this issue 1 year ago • 0 comments

优化命令 onnxsim model.b1.onnx model.b1.sim.onnx 版本0.4.24 Your model contains "Tile" ops or/and "ConstantOfShape" ops. Folding these ops can make the simplified model much larger. If it is not expected, please specify "--no-large-tensor" (which will lose some optimization chances) Simplifying... Traceback (most recent call last): File "d:\ProgramData\anaconda3\lib\site-packages\onnxsim\onnx_simplifier.py", line 186, in simplify model_bytes = model.SerializeToString() ValueError: Message onnx.ModelProto exceeds maximum protobuf size of 2GB: 3439974263

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "d:\ProgramData\anaconda3\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "d:\ProgramData\anaconda3\lib\runpy.py", line 86, in run_code exec(code, run_globals) File "d:\ProgramData\anaconda3\Scripts\onnxsim.exe_main.py", line 7, in File "d:\ProgramData\anaconda3\lib\site-packages\onnxsim\onnx_simplifier.py", line 453, in main model_opt, check_ok = simplify( File "d:\ProgramData\anaconda3\lib\site-packages\onnxsim\onnx_simplifier.py", line 214, in simplify check_ok = model_checking.compare( File "d:\ProgramData\anaconda3\lib\site-packages\onnxsim\model_checking.py", line 161, in compare onnx.checker.check_model(model_opt) File "d:\ProgramData\anaconda3\lib\site-packages\onnx\checker.py", line 108, in check_model C.check_model_path(model, full_check) onnx.onnx_cpp2py_export.checker.ValidationError: Data of TensorProto ( tensor name: conv_in.weight) should be stored in c0383586-3e4d-4903-84e7-d384e9f51635, but it doesn't exist or is not accessible.

luchangli03 avatar Apr 24 '23 04:04 luchangli03