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

OpCodeGenerator is unimplemented for Softplus #45

Open
juhan opened this issue Apr 7, 2022 · 1 comment
Open

OpCodeGenerator is unimplemented for Softplus #45

juhan opened this issue Apr 7, 2022 · 1 comment

Comments

@juhan
Copy link

juhan commented Apr 7, 2022

When trying to convert a Yolov4 ONNX model with onnx-pytorch I get the following error. Seems to be an unimplemented OpCode for Softplus.

WARNING:root:Cannot get default value for dilations of Conv.
WARNING:root:Cannot get default value for kernel_shape of Conv.
WARNING:root:Cannot get default value for pads of Conv.
WARNING:root:Cannot get default value for strides of Conv.
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/someenv/lib/python3.8/site-packages/onnx_pytorch/code_gen.py", line 378, in
main()
File "/someenv/python3.8/site-packages/onnx_pytorch/code_gen.py", line 368, in main
gen(onnx_model=args.onnx_model_path,
File "/someenv/python3.8/site-packages/onnx_pytorch/code_gen.py", line 291, in gen
model_code_generator.run()
File "/someenv/python3.8/site-packages/onnx_pytorch/code_gen.py", line 246, in run
raise NotImplementedError(
NotImplementedError: OpCodeGenerator is unimplemented for Softplus.

Installed version:

pip show onnx_pytorch
Name: onnx-pytorch
Version: 0.1.4
Summary: Convert ONNX to PyTorch code.
Home-page: https://github.com/fumihwh/onnx-pytorch
Author: fumihwh
Author-email: fumihwh@gmail.com
License: Apache 2.0
Location: /someenv/lib/python3.8/site-packages
Requires: torchvision, setuptools, torch, PyYAML, tqdm, onnxruntime, onnx, sympy, pytest, numpy
Required-by:

@fumihwh
Copy link
Owner

fumihwh commented Apr 14, 2022

Hi, @juhan could you add support for this op? Contribution is welcome!
Just follow the PRelu, I think it could help.

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

2 participants