From 262e2ca8a6f4aaad20defcfe58b13c1f7dc13e13 Mon Sep 17 00:00:00 2001 From: "weisu.yxd" Date: Wed, 21 Aug 2024 19:14:04 +0800 Subject: [PATCH] add custom op & kd loss --- easy_rec/python/loss/listwise_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_rec/python/loss/listwise_loss.py b/easy_rec/python/loss/listwise_loss.py index e31385dac..f778f38f8 100644 --- a/easy_rec/python/loss/listwise_loss.py +++ b/easy_rec/python/loss/listwise_loss.py @@ -44,7 +44,7 @@ def listwise_rank_loss(labels, """ loss_name = name if name else 'listwise_rank_loss' logging.info('[{}] temperature: {}'.format(loss_name, temperature)) - + labels = tf.to_float(labels) if temperature != 1.0: logits /= temperature if label_is_logits: