Added Focal loss. Use focal_loss=1 in the [region] layer in your cfg-file.

alpha = 0.5, gamma = 2
This commit is contained in:
AlexeyAB
2018-03-05 19:59:29 +03:00
parent f0bc634a74
commit 5e448c00f3
3 changed files with 31 additions and 9 deletions

View File

@ -250,6 +250,7 @@ layer parse_region(list *options, size_params params)
l.small_object = option_find_int_quiet(options, "small_object", 0);
l.softmax = option_find_int(options, "softmax", 0);
l.focal_loss = option_find_int_quiet(options, "focal_loss", 0);
//l.max_boxes = option_find_int_quiet(options, "max",30);
l.jitter = option_find_float(options, "jitter", .2);
l.rescore = option_find_int_quiet(options, "rescore",0);