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
I trying to export dm_nfnet_f0 to onnx using gen-efficientnet-pytorch. But raise onnx operator is not be supported.
RuntimeError: Exporting the operator std_mean to ONNX opset version 11 is not supported. Please open a bug to request ONNX export support for the missing operator.
whet can I do to solve this problem, or is there another ways to convert pth.tar(dm_nfnet_f0) to onnx?
Thanks.
Traceback (most recent call last):
File "onnx_export.py", line 83, in
main()
File "onnx_export.py", line 60, in main
torch_out = torch.onnx._export(
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/init.py", line 28, in _export
result = utils._export(*args, **kwargs)
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/utils.py", line 632, in _export
_model_to_graph(model, args, verbose, input_names,
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/utils.py", line 417, in _model_to_graph
graph = _optimize_graph(graph, operator_export_type,
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/utils.py", line 203, in _optimize_graph
graph = torch._C._jit_pass_onnx(graph, operator_export_type)
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/init.py", line 263, in _run_symbolic_function
return utils._run_symbolic_function(*args, **kwargs)
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/utils.py", line 930, in _run_symbolic_function
symbolic_fn = _find_symbolic_in_registry(domain, op_name, opset_version, operator_export_type)
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/utils.py", line 888, in _find_symbolic_in_registry
return sym_registry.get_registered_op(op_name, domain, opset_version)
File "/home/chenwh/anaconda3/lib/python3.8/site-packages/torch/onnx/symbolic_registry.py", line 111, in get_registered_op
raise RuntimeError(msg)
RuntimeError: Exporting the operator std_mean to ONNX opset version 11 is not supported. Please open a bug to request ONNX export support for the missing operator.
@linhduongtuan@ooodragon94 yes, I should add that git install command in the README. I tend to delay the official pip releases to give the master a bit of time to ensure bugs aren't found (and to allow me to re-run full model validation results.csv generation after adding new models, which takes multiple days now). A bunch of new updates coincided with all the NFNet activity. And my validation run keeps crashing the old test machine so it's taking a while :/
Activity
rwightman commentedon Feb 19, 2021
@Splendon if you google for it you'll find that op was only added to PyTorch recently and not in the last release. You have a few options
use_layernormto default to True might work, it hijacks the layer_norm kernel to do the mean/std and might be supportedooodragon94 commentedon Feb 23, 2021
@rwightman another question on "dm_nfnet_f0"
using pip installed timm
seems like there is no model defined on timm version 0.3.4
is there something I am missing or maybe my system is outdated?
thanks
linhduongtuan commentedon Feb 23, 2021
linhduongtuan commentedon Feb 23, 2021
ooodragon94 commentedon Feb 23, 2021
@linhduongtuan thank you very much!
rwightman commentedon Feb 23, 2021
@linhduongtuan @ooodragon94 yes, I should add that git install command in the README. I tend to delay the official pip releases to give the master a bit of time to ensure bugs aren't found (and to allow me to re-run full model validation results.csv generation after adding new models, which takes multiple days now). A bunch of new updates coincided with all the NFNet activity. And my validation run keeps crashing the old test machine so it's taking a while :/
ooodragon94 commentedon Mar 5, 2021
@rwightman always appreciate your hard work. Thx a ton
Splendon commentedon Mar 15, 2021
@rwightman thank you very much for your suggestion, I'am trying these suggestion to deal with this operator.
Splendon commentedon Mar 15, 2021
@rwightman I have transformed nfnet from pth to onnx successfully, by using pytorch1.8.