You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opencd is cool. And I try to use the ‘export.py to transfer .pth model into onnx.
with this: python3 tools/export.py --config ./work_dirs/changer_ex_eva_256x256_levircd/changer_ex_eva_256x256_levircd.py --checkpoint ./work_dirs/changer_ex_eva_256x256_levircd/best_mIoU_iter_29000.pth
the error occurs
INFO:opencd:Namespace(config='/root/cd_test/rs-pangu-cd/code/work_dirs/changer_ex_eva_256x256_levircd/changer_ex_eva_256x256_levircd.py', checkpoint='/root/cd_test/rs-pangu-cd/code/work_dirs/changer_ex_eva_256x256_levircd/best_mIoU_iter_29000.pth', inputs=['1,3,256,256', '1,3,256,256'], model_name='model.onnx')
INFO:root:Shape of rope freq: torch.Size([324, 64])
Traceback (most recent call last):
File "/root/cd_test/rs-pangu-cd/code/tools/export.py", line 65, in <module>
main(args)
File "/root/cd_test/rs-pangu-cd/code/tools/export.py", line 41, in main
torch.onnx.export(
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/__init__.py", line 305, in export
return utils.export(model, args, f, export_params, verbose, training,
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/utils.py", line 118, in export
_export(model, args, f, export_params, verbose, training, input_names, output_names,
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/utils.py", line 719, in _export
_model_to_graph(model, args, verbose, input_names,
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/utils.py", line 503, in _model_to_graph
graph = _optimize_graph(graph, operator_export_type,
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/utils.py", line 232, in _optimize_graph
graph = torch._C._jit_pass_onnx(graph, operator_export_type)
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/__init__.py", line 354, in _run_symbolic_function
return utils._run_symbolic_function(*args, **kwargs)
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/utils.py", line 1038, in _run_symbolic_function
return torch._C._jit_onnx_convert_pattern_from_subblock(block, n, env)
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/__init__.py", line 354, in _run_symbolic_function
return utils._run_symbolic_function(*args, **kwargs)
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/utils.py", line 1061, in _run_symbolic_function
return symbolic_fn(g, *inputs, **attrs)
File "/usr/local/lib64/python3.9/site-packages/torch/onnx/symbolic_opset11.py", line 114, in index_put
if indices_list[idx_].type().scalarType() == "Bool":
RuntimeError: rINTERNAL ASSERT FAILED at "/root/pytorch/aten/src/ATen/core/jit_type_base.h":540, please report a bug to PyTorch.
Opencd is cool. And I try to use the ‘export.py to transfer .pth model into onnx.
with this:
python3 tools/export.py --config ./work_dirs/changer_ex_eva_256x256_levircd/changer_ex_eva_256x256_levircd.py --checkpoint ./work_dirs/changer_ex_eva_256x256_levircd/best_mIoU_iter_29000.pth
the error occurs
How can I solve it?
Environment:
torch 1.11.0
mmcv 2.1.0
mmdet 3.2.0
mmengine 0.10.3
mmsegmentation 1.2.2
The text was updated successfully, but these errors were encountered: