没有tf.losses.absolute_difference()函数,也没有tf.losses.Reduction.MEAN属性。 我应该用什么来代替呢?这是不能与TF2一起运行的TF1.x代码: result = tf.losses.absolute_difference(a,b,reduction=tf.losses.Reduction.MEAN)
我尝试为具有两个属性(列)值等于"On“的每个参与者(由一行表示)添加"1”的分数。有没有更简单的解决方案?for row in reduction.itertuples():
if str(reduction['q1-1']) == "On" and str(reduction['q1-2']) =