You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a retrieval model. I have positive samples and some weights corresponding to each of these sample which helps to denote that for the given sample how much weight it holds. I want to use these weights so that I have better recommendations from the retrieval model. I'm assuming that sample_weights param can help me to do this.
Let me know if I'm thinking in the right way and if yes, Is this the right way to do this?
Hi,
I'm trying to build a retrieval model. I have positive samples and some weights corresponding to each of these sample which helps to denote that for the given sample how much weight it holds. I want to use these weights so that I have better recommendations from the retrieval model. I'm assuming that sample_weights param can help me to do this.
Let me know if I'm thinking in the right way and if yes, Is this the right way to do this?
self.task = tfrs.tasks.Retrieval(metrics=metrics)
def compute_loss(self, features, training=False):
q_emb = ...
p_emb = ...
return self.task(q_emb, p_emb, compute_metrics=not training, sample_weight=features['weight'])
The text was updated successfully, but these errors were encountered: