CNN with weighted least-squares minimization loss

47 views
Skip to first unread message

Rein Y. Wu

unread,
Jun 9, 2016, 8:06:24 PM6/9/16
to Caffe Users
Hi,
I am hoping to implement something like a weighted least squares minimization loss function.

For each sample,

there is a loss  = sum(p_i * (x_io  - x_i)^2) / N

x_io is the estimated value, x_i is the ground-truth and p_i is the weight. N is the number of attribute we have.

Does Caffe supports this structure ? Or is there any package that supports this structure ? If yes, where I can input the p_i ?

Thank you so much !
Best regards,
Yuhang

Jan

unread,
Jun 10, 2016, 8:12:43 AM6/10/16
to Caffe Users
No, afaik there is no such layer currently in caffe. But you relatively easily write your own: Make a copy of EuclideanLossLayer (which does the regular least squares loss, without weighing) and adjust the code. You'll need to think about how the p_i should be provided to the layer, by static configuration, or as a layer input.

Jan
Reply all
Reply to author
Forward
0 new messages