add HingeLossLayer for one-vs-all hinge loss
authorJonathan L Long <jonlong@cs.berkeley.edu>
Tue, 8 Apr 2014 03:35:33 +0000 (20:35 -0700)
committerJonathan L Long <jonlong@cs.berkeley.edu>
Fri, 25 Apr 2014 23:38:03 +0000 (16:38 -0700)
commitdbad77552149377eb3a0735f2e613ac1840a1280
treeb97762dbe4141bd3aa358fae48b55f0cf32e4749
parentc6f1011bb4fe49383b12bca1fa5753c6421ad2ef
add HingeLossLayer for one-vs-all hinge loss

This layer implements a "one-vs-all" hinge loss, (1/n) sum_ij max(0, 1 -
y_ij x_ij), with bottom blob x_ij (i ranging over examples and j over
classes), and y_ij = +1/-1 indicating the label. No regularization is
included, since regularization is done via weight decay or using the
parameters of another layer. The gradient is taken to be zero at the
hinge point. This commit only provides the CPU implementation.
include/caffe/vision_layers.hpp
src/caffe/layer_factory.cpp
src/caffe/layers/loss_layer.cpp
src/caffe/proto/caffe.proto