Skip to content

Commit da58d7a

Browse files
committed
bce logits loss as same as deepgo
1 parent ee3b554 commit da58d7a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import torch
2+
3+
4+
class WrappedBCEWithLogitsLoss(torch.nn.BCEWithLogitsLoss):
5+
def forward(self, input, target, **kwargs):
6+
# As the custom passed kwargs are not used in BCEWithLogitsLoss, we can ignore them
7+
return super().forward(input, target)

configs/loss/BCELoss.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

configs/loss/BCEWithLogitsLoss.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class_path: chebai_proteins.loss.bce_logits_loss.WrappedBCEWithLogitsLoss

0 commit comments

Comments
 (0)