Skip to content

Commit

Permalink
fix bug in encoder_similarity
Browse files Browse the repository at this point in the history
  • Loading branch information
lnishimw committed May 30, 2024
1 parent 641091c commit a8df9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/nllb/laser_distillation/encoder_similarity.py
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ class EncoderSimilarityCriterion(FairseqCriterion):
def __init__(self, task, sentence_avg, contrast, margin, distil_loss):
super().__init__(task)
self.sentence_avg = sentence_avg
if distil_loss = "mse":
if distil_loss == "mse":
self.loss = MSELoss(reduction="sum")
elif distil_loss == "snr":
self.loss = SNRLoss()

0 comments on commit a8df9d0

Please sign in to comment.