Transformer running
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
from torch import nn
|
||||
|
||||
from ml_lib.additions.losses import FocalLoss, FocalLossRob
|
||||
|
||||
|
||||
class LossMixin:
|
||||
|
||||
absolute_loss = nn.L1Loss()
|
||||
nll_loss = nn.NLLLoss()
|
||||
bce_loss = nn.BCELoss()
|
||||
ce_loss = nn.CrossEntropyLoss()
|
||||
ce_loss = nn.CrossEntropyLoss()
|
||||
focal_loss = FocalLoss(None)
|
||||
focal_loss_rob = FocalLossRob()
|
||||
|
||||
Reference in New Issue
Block a user