{
"operator": "HardSigmoid",
"description": "MindSpore Lite 优化器无法正确处理 HardSigmoid+Mul 融合,导致推理错误",
"replacement": {
"type": "composite",
"formula": "max(min(x * alpha + beta, 1), 0)",
"ops": ["Mul", "Add", "Min", "Max"],
"params": {
"alpha": 0.2,
"beta": 0.5
}
},
"onnx_script": "replace_hardsigmoid_equivalent(input_path, output_path)",
"error_pattern": "sigmoid_mul_fusion.*activation type is not sigmoid",
"test_input": {
"shape": [1, 64, 112, 112],
"verify_output": false
}
}