1 #ifndef CAFFE_INFOGAIN_LOSS_LAYER_HPP_ 2 #define CAFFE_INFOGAIN_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" 46 template <
typename Dtype>
63 virtual inline const char*
type()
const {
return "InfogainLoss"; }
103 const vector<bool>& propagate_down,
const vector<
Blob<Dtype>*>& bottom);
110 #endif // CAFFE_INFOGAIN_LOSS_LAYER_HPP_ virtual void LayerSetUp(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
Does layer-specific setup: your layer should implement this function as well as Reshape.
Definition: infogain_loss_layer.cpp:11
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: infogain_loss_layer.hpp:63
A generalization of MultinomialLogisticLossLayer that takes an "information gain" (infogain) matrix s...
Definition: infogain_loss_layer.hpp:47
virtual void Backward_cpu(const vector< Blob< Dtype > *> &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > *> &bottom)
Computes the infogain loss error gradient w.r.t. the predictions.
Definition: infogain_loss_layer.cpp:71
virtual int MaxBottomBlobs() const
Returns the maximum number of bottom blobs required by the layer, or -1 if no maximum number is requi...
Definition: infogain_loss_layer.hpp:61
virtual void Forward_cpu(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
A generalization of MultinomialLogisticLossLayer that takes an "information gain" (infogain) matrix s...
Definition: infogain_loss_layer.cpp:47
virtual int ExactNumBottomBlobs() const
Returns the exact number of bottom blobs required by the layer, or -1 if no exact number is required...
Definition: infogain_loss_layer.hpp:59
An interface for Layers that take two Blobs as input – usually (1) predictions and (2) ground-truth ...
Definition: loss_layer.hpp:23
virtual int MinBottomBlobs() const
Returns the minimum number of bottom blobs required by the layer, or -1 if no minimum number is requi...
Definition: infogain_loss_layer.hpp:60
virtual void Reshape(const vector< Blob< Dtype > *> &bottom, const vector< Blob< Dtype > *> &top)
Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs...
Definition: infogain_loss_layer.cpp:25
A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...
Definition: blob.hpp:24