We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc7ac95 commit bd63bf3Copy full SHA for bd63bf3
merlin/models/tf/outputs/sampling/popularity.py
@@ -147,7 +147,7 @@ def get_sampling_distribution(self) -> tf.Tensor:
147
tf.Tensor
148
Probabilities of each item to be sampled
149
"""
150
- log_indices = tf.math.log(tf.range(1.0, self.max_id - self.min_id + 2.0, 1.0))
+ log_indices = tf.math.log(tf.range(1.0, self.max_id - self.min_id + 3.0, 1.0))
151
sampling_probs = (log_indices[1:] - log_indices[:-1]) / log_indices[-1]
152
153
if self.unique:
0 commit comments