转换带有prelu的模型会失败
Created by: Y-Rony
onnx版本: 1.6.0 onnxruntime版本: 1.0.0 python: 3.6 OS:win10 命令: x2paddle --framework=onnx --model=E:/project/pytorch/onnx/my_checkpoint.onnx --save_dir=E:/project/paddle/models/
error如下:
initializer 'layer4.2.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model. Total nodes: 149 Traceback (most recent call last): File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\programdata\anaconda3\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\Scripts\x2paddle.exe_main.py", line 7, in File "c:\programdata\anaconda3\lib\site-packages\x2paddle\convert.py", line 268, in main onnx2paddle(args.model, args.save_dir, params_merge) File "c:\programdata\anaconda3\lib\site-packages\x2paddle\convert.py", line 182, in onnx2paddle mapper = ONNXOpMapper(model, save_dir) File "c:\programdata\anaconda3\lib\site-packages\x2paddle\op_mapper\onnx_op_mapper.py", line 91, in init func(node) File "c:\programdata\anaconda3\lib\site-packages\x2paddle\op_mapper\onnx_op_mapper.py", line 1027, in PRelu if len(shape_slope) == 1: TypeError: object of type 'NoneType' has no len()