Label Smoothing applied in Focal Loss
This code is based on the below papers.
criteria = FocalLossWithSmoothing(num_classes)
logits = model(inputs)
loss = criteria(logits, labels)
optim.zero_grad()
loss.backward()
optim.step()
Label Smoothing applied in Focal Loss
This code is based on the below papers.
criteria = FocalLossWithSmoothing(num_classes)
logits = model(inputs)
loss = criteria(logits, labels)
optim.zero_grad()
loss.backward()
optim.step()