OpenPPL / ppq

PPL Quantization Tool (PPQ) is a powerful offline neural network quantization tool.
Apache License 2.0
1.57k stars 236 forks source link

关于resize op的一个bug #532

Open Nusselder9 opened 10 months ago

Nusselder9 commented 10 months ago

ppq/executor/op/torch/default.py L1457

scale_factor = values[2].cpu() if len(values) > 2 else None

当resize op的输入是“x, None, None, size”的时候,会报错,因为values[2]是None,None没有.cpu()方法。

ps: 根据onnx resize的说明,scale_factor和size只能有一个:https://github.com/onnx/onnx/blob/main/docs/Operators.md#Resize

ZhangZhiPku commented 10 months ago

啊这

Aspen0309 commented 4 months ago

请问解决了吗