fake_quantize_range_abs_max算子不支持
onnx模型转paddle模型,使用paddleslim可以完成离线量化,但离线量化后的paddle模型再转onnx模型存在op不支持问题
报错信息:
/usr/local/lib/python3.9/site-packages/onnx/mapping.py:27: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
int(TensorProto.STRING): np.dtype(np.object)
/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/constant/dtypes.py:49: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/constant/dtypes.py:50: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/constant/dtypes.py:55: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
File "/usr/local/bin/paddle2onnx", line 33, in
请拉这个PR进行测试:https://github.com/PaddlePaddle/Paddle2ONNX/pull/399
请拉这个PR进行测试:#399
fake_quantize_range_abs_max这个算子还是没有支持,没看到这个PR支持fake_quantize_range_abs_max,麻烦帮忙再看下
好的,收到反馈,我们会尽快支持。
请问一下,你是什么使用使用场景啊?导出为ONNX模型的原因是?
请问一下,你是什么使用使用场景啊?导出为ONNX模型的原因是?
idg的项目中需要,lidar 3D点云检测,原模型是pytorch训练的,然后量化后误差较大,现在尝试转成paddle模型,用paddleslim的离线量化方式,目前存在fake_quantize_range_abs_max不支持,辛苦尽快支持下!
您好,麻烦再试一下这个PR:https://github.com/PaddlePaddle/Paddle2ONNX/pull/399
这个PR是否已经解决了 这个问题? There's 2 ops are not supported yet =========== fake_channel_wise_quantize_dequantize_abs_max =========== =========== fake_quantize_dequantize_moving_average_abs_max ===========
这个PR是否已经解决了 这个问题? There's 2 ops are not supported yet =========== fake_channel_wise_quantize_dequantize_abs_max =========== =========== fake_quantize_dequantize_moving_average_abs_max ===========
/usr/local/lib/python3.9/site-packages/onnx/mapping.py:27: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
int(TensorProto.STRING): np.dtype(np.object)
/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/constant/dtypes.py:49: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/constant/dtypes.py:50: DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/constant/dtypes.py:55: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
2022-02-22 16:47:44 [WARNING]
There are 2 ops that are not supported in opset version 9, please set opset version >= 13.
=========== fake_channel_wise_dequantize_max_abs ===========
=========== fake_quantize_range_abs_max ===========
2022-02-22 16:47:44 [WARNING]
For a successful conversion, set the recommended opset version : 13
======================
/usr/local/lib/python3.9/site-packages/onnx/helper.py:343: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working is_iterable = isinstance(value, collections.Iterable) 2022-02-22 16:47:45 [INFO] ONNX model generated is valid. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/paddle2onnx-0.9.0-py3.9.egg/paddle2onnx/utils.py", line 43, in check_model File "/usr/local/lib/python3.9/site-packages/onnx/checker.py", line 104, in check_model C.check_model(protobuf_string) onnx.onnx_cpp2py_export.checker.ValidationError: Nodes in a graph must be topologically sorted, however input 'relu_3.tmp_0.quantized_0.paddleadd0' of node: name: ConvTranspose_0 OpType: ConvTranspose is not output of any previous nodes.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/paddle2onnx", line 33, in
拉取PR后报以上错误,opset我更新到1.3了,麻烦看下还是什么原因?
您好,麻烦再试一下这个PR:#399
又报了新的错误,麻烦帮忙看下
您好,麻烦提供一下模型,我这边具体来测试一下。