Closed
[Bug-Report|缺陷反馈]:950上SoftMarginLoss算子的DAG计算INF传播与910等旧版本实现不一致,且与本仓库的SoftMarginLossGrad反向算子也不一致,存在兼容性风险 #7364
m0_46386992Add on 26 days agoClosed at 26 days ago
26 days ago Added label: bug-report
26 days ago Close issue
26 days ago Added label: resolved
11 days ago Associated pull request
Describe the current behavior / 问题描述 (Mandatory / 必填)
950上SoftMarginLoss算子的DAG计算INF传播与910等旧版本实现不一致,且与本仓库的SoftMarginLossGrad反向算子也不一致,存在兼容性风险;
950上实现从原来的L[i] = log(1 + exp(-targetself)) 转换成了 L = max(0,-tx) + log1p(exp(-|tx|)) 的计算方式,采用了与本仓同一反向算子SoftMarginLoss\pytorch\910等旧实现均不同的公式,目的是修正-targetself > ~88.72时导致的INF溢出问题。
Environment Information / 环境信息 (Mandatory / 必填)
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
构造用例 x shape [4] 取值范围[-89, 100] y shape[4] 取值范围[1, 1],并进行kernel调用测试,发现并未产生INF传播问题
Describe the expected behavior / 预期结果 (Mandatory / 必填)
期望和910、grad算子等方式一样,产生INF传播
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
执行后未产生INF传播
Special notes for this issue/备注 (Optional / 选填)