Closed
[Documentation|文档反馈]: SigmoidFocalLossGrad算子长尾加固 #8421
liuhongpengAdd on  12 days agoClosed at  11 days ago
liuhongpeng
liuhongpeng
12 days ago Create

Document Link(文档链接)

loss/sigmoid_focal_loss_grad/README.md

Issues Section(问题文档片段)

  • pred、target、dout、grad与存在时的weight必须是非空二维ND Tensor,shape完全相同,不支持广播。
  • target只支持INT32,业务标签语义为0或1;IR和Kernel不在运行前逐元素检查Device侧数值。
  • pred、dout和weight可分别使用FLOAT16或FLOAT,grad的数据类型必须与pred相同。
  • alpha和gamma必须为有限数;reduction只能为mean、sum或none。

Existing Issues(存在的问题)

  • pred、target、dout、grad与存在时的weight必须是非空二维ND Tensor,shape完全相同,不支持广播。
  • target只支持INT32,业务标签语义为0或1;IR和Kernel不在运行前逐元素检查Device侧数值,取0/1以外的值时不保证结果正确。
  • pred、dout和weight可分别使用FLOAT16或FLOAT,grad的数据类型必须与pred相同。
  • FLOAT16输入在算子内部统一按FLOAT32计算,结果再按pred的数据类型回写(FLOAT16输出按就近舍入);中间结果超出FLOAT16可表示范围时回写为±Inf。
  • 计算log(p)与log(1-p)前,分别将p与1-p钳位到最小正规格化数1.17549435e-38,因此pred处于饱和区(p趋近0或1)时仍返回有限值。
  • pred、dout或weight包含NaN或±Inf时不在支持范围内,结果不保证正确。
  • alpha和gamma必须为有限数;reduction只能为mean、sum或none(大小写不敏感)。
  • alpha、gamma 的乘积等中间量超出 FP32 表示范围时按 IEEE Inf/NaN 传播,不额外拦截;需要有限极值的场景应在属性取值上避免此类组合。
  • Ascend 950图模式支持动态Shape(-1未知维),不支持动态Rank(-2未知秩)。
likedislike
liuhongpeng
liuhongpeng
12 days ago Comments:

/assign

likedislike
CANN-robotCANN-robotCollaborators
12 days ago Assign liu_hp711 as responsible person
CANN-robotCANN-robotCollaborators
11 days ago Close issue
CANN-robotCANN-robotCollaborators
11 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
11 days ago Added label: resolved