admin管理员组

文章数量:1599539

loss出错 [predictions must be >= 0] [Condition x >= y did not hold element-wise:]

报错代码:
BaseCollectiveExecutor::StartAbort Invalid argument: assertion failed: [predictions must be >= 0]
[Condition x >= y did not hold element-wise:]
[x (model/conv2d_20/Sigmoid:0) = ] [[[[nan][nan][nan]]]…]
[y (metrics/auc/Cast_1/x:0) = ] [0]
[[{{node metrics/auc/assert_greater_equal/Assert/AssertGuard/else/_1/Assert}}]]
[[metrics/recall/assert_less_equal/Assert/AssertGuard/pivot_f/_69/_121]]
原因:
tf.sqrt()开根号导致在0处不可导NAN
解决:
加个很小的数即可

本文标签: conditionpredictionslosswiseelement