Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 444 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 444 Bytes

Focal Loss with Label Smoothing

Label Smoothing applied in Focal Loss
This code is based on the below papers.

How to use

criteria = FocalLossWithSmoothing(num_classes)

logits = model(inputs)
loss = criteria(logits, labels)

optim.zero_grad()
loss.backward()
optim.step()