1 #ifndef CAFFE_HINGE_LOSS_LAYER_HPP_
2 #define CAFFE_HINGE_LOSS_LAYER_HPP_
6 #include "caffe/blob.hpp"
7 #include "caffe/layer.hpp"
8 #include "caffe/proto/caffe.pb.h"
10 #include "caffe/layers/loss_layer.hpp"
57 template <
typename Dtype>
63 virtual inline const char*
type()
const {
return "HingeLoss"; }
98 const vector<bool>& propagate_down,
const vector<
Blob<Dtype>*>& bottom);
104 #endif // CAFFE_HINGE_LOSS_LAYER_HPP_
virtual void Forward_cpu(const vector< Blob< Dtype > * > &bottom, const vector< Blob< Dtype > * > &top)
Computes the hinge loss for a one-of-many classification task.
Definition: hinge_loss_layer.cpp:10
A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers,...
Definition: blob.hpp:24
An interface for Layers that take two Blobs as input – usually (1) predictions and (2) ground-truth l...
Definition: loss_layer.hpp:23
virtual void Backward_cpu(const vector< Blob< Dtype > * > &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > * > &bottom)
Computes the hinge loss error gradient w.r.t. the predictions.
Definition: hinge_loss_layer.cpp:43
Computes the hinge loss for a one-of-many classification task.
Definition: hinge_loss_layer.hpp:58
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
virtual const char * type() const
Returns the layer type.
Definition: hinge_loss_layer.hpp:63