Weight multiple loss functions

136 views
Skip to first unread message

Peter Neher

unread,
Jan 12, 2016, 6:35:29 AM1/12/16
to Caffe Users
Hi everyone,

is there a way to weight the influence of multiple loss functions?

Thanks
Peter

Evan Shelhamer

unread,
Jan 12, 2016, 4:57:31 PM1/12/16
to Peter Neher, Caffe Users
All loss layers have a default weight of 1 but one can set a custom loss weight: https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto#L319-L322. Add `loss_weight: 2` to the `layer { }` definition to double it for instance.

This can even be done for non-loss layers as a way to make custom losses.

Evan Shelhamer





--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/121377ab-c9f5-401c-906c-8d5c17c22c20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Neher

unread,
Jan 13, 2016, 2:04:09 AM1/13/16
to Caffe Users, pne...@gmail.com
Perfect. Thank you!
Reply all
Reply to author
Forward
0 new messages