Skip to content

maozezhong/focal_loss_multi_class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Focal loss

Usage

  • firstly, you should get a list which contains each class number, like classes_nu=[1,2,3] means index_0 class have 1 pic, index_1 class have 1 pics, index_2 class have 3 pics.
  • then, use the focal loss function like below:

model.compile(optimizer=SGD(lr=learning_rate, momentum=0.9), loss=[focal_loss(classes_num)], metrics=['accuracy'])

blog of focal loss

About

mutil-class focal loss implemented in keras

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages