From de402d6ff9e162ba7c9a58dd85f4880357398030 Mon Sep 17 00:00:00 2001 From: getumen Date: Fri, 17 May 2024 10:05:44 +0900 Subject: [PATCH] fix keras compatibility bug in factorized_top_k --- tensorflow_recommenders/layers/factorized_top_k.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_recommenders/layers/factorized_top_k.py b/tensorflow_recommenders/layers/factorized_top_k.py index b6a7f45..6159803 100644 --- a/tensorflow_recommenders/layers/factorized_top_k.py +++ b/tensorflow_recommenders/layers/factorized_top_k.py @@ -373,7 +373,7 @@ def __init__(self, self._num_parallel_calls = num_parallel_calls self._sorted = sorted_order - self._counter = self.add_weight("counter", dtype=tf.int32, trainable=False) + self._counter = self.add_weight(name="counter", dtype=tf.int32, trainable=False) def index_from_dataset( self,