def calculate_mseloss(self, predictions, labels, **unused_params):
with tf.name_scope("loss_mse"):
float_labels = tf.cast(labels, tf.float32)
mse_loss = tf.square(predictions-float_labels)
return tf.reduce_mean(tf.reduce_sum(mse_loss, 1))
评论列表
文章目录