Skip to content

Commit

Permalink
Change duplicate dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
GrogusBall committed Feb 25, 2021
1 parent 142fc0d commit df8e8c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deep_recommenders/layers/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@Author: Wang Yao
@Date: 2021-02-20 16:23:44
@LastEditors: Wang Yao
@LastEditTime: 2021-02-22 22:09:02
@LastEditTime: 2021-02-24 19:43:14
"""
from typing import Tuple

Expand Down Expand Up @@ -79,7 +79,7 @@ def call(self,
positive_identifier = tf.gather(identifiers, positive_indices)

duplicate = tf.equal(positive_identifier, tf.transpose(identifiers))
duplicate = tf.cast(duplicate, tf.float32)
duplicate = tf.cast(duplicate, labels.dtype)

duplicate = duplicate - labels

Expand Down

0 comments on commit df8e8c5

Please sign in to comment.