OpenPPL / ppq

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

statistical_analyse分析时,会异常退出 #513

Open BlueSkyB opened 1 year ago

BlueSkyB commented 1 year ago

ppq 0.6.6 torch 1.11

statistical_analyse 分析时,会报错"RuntimeError: mean(): input dtype should be either floating point or complex dtypes. Got Long instead."。和#409是一样的问题。同样是Slice算子出错了。

原因是https://github.com/openppl-public/ppq/blob/95c34be4c13c18a4ec802f64815c9c8924489099/ppq/quantization/analyse/graphwise.py#L299 代码中,PASSIVE_OPERATIONS的定义,'Dropout'和'Slice'算子间,少了","号,导致'Slice'没有被识别。

ZhangZhiPku commented 1 year ago

竟然是这样?