From 27b1e6b91b9a7e9ac12626c933acce41f1efd550 Mon Sep 17 00:00:00 2001 From: Chris Messier Date: Tue, 22 Oct 2024 14:53:38 -0400 Subject: [PATCH] corrected issue accessing factorized top-k counter, described here: https://github.com/tensorflow/recommenders/issues/712#issuecomment-2041163592 --- 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,