From e525590b16f492b064cf7922854752b283f9125f Mon Sep 17 00:00:00 2001 From: Evan Smothers Date: Thu, 2 Nov 2023 16:47:21 -0700 Subject: [PATCH] Change default logit scale in contrastive loss with temperature from parameter to float --- .../modules/losses/contrastive_loss_with_temperature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchmultimodal/modules/losses/contrastive_loss_with_temperature.py b/torchmultimodal/modules/losses/contrastive_loss_with_temperature.py index 58a3be447..155445a0d 100644 --- a/torchmultimodal/modules/losses/contrastive_loss_with_temperature.py +++ b/torchmultimodal/modules/losses/contrastive_loss_with_temperature.py @@ -115,7 +115,7 @@ def contrastive_loss_with_temperature( ) -DEFAULT_LOGIT_SCALE = nn.Parameter(math.log(1 / 0.07) * torch.ones([])) +DEFAULT_LOGIT_SCALE = math.log(1 / 0.07) class ContrastiveLossWithTemperature(nn.Module):