Skip to content
Snippets Groups Projects
Commit 59f23d0b authored by umlauf's avatar umlauf
Browse files

CEL

parent 564b336b
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@ def train(model, name, seed,gradient_accumulation_steps,mixup, threshold, lambda
def cross_entropy(preds, target):
log_preds = torch.log(preds)
loss = -torch.mean(target * log_preds)
loss = -torch.sum(target * log_preds) / preds.shape[0]
return loss
def mixup_function(batch_of_matrices, batch_of_labels, l, t):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment