tensorflow 处理0的除法运算

0/0=0

高版本tf:

tf.math.divide_no_nan(
    x, y, name=None
)

低版本tf: 

tf.div_no_nan(x, y)

你可能感兴趣的:(Python代码,tensorflow)