Skip to content

Commit

Permalink
fix BCELoss, reduction='sum'
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuddo committed Oct 23, 2023
1 parent d300be2 commit 7c7ff21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cornac/models/ncf/recom_ncf_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _fit_pt(self):
lr=self.lr,
weight_decay=self.reg,
)
criteria = nn.BCELoss()
criteria = nn.BCELoss(reduction="sum")

loop = trange(self.num_epochs, disable=not self.verbose)
for _ in loop:
Expand Down

0 comments on commit 7c7ff21

Please sign in to comment.