1 #ifndef CAFFE_ARGMAX_LAYER_HPP_
2 #define CAFFE_ARGMAX_LAYER_HPP_
6 #include "caffe/blob.hpp"
7 #include "caffe/layer.hpp"
8 #include "caffe/proto/caffe.pb.h"
23 template <
typename Dtype>
39 :
Layer<Dtype>(param) {}
45 virtual inline const char*
type()
const {
return "ArgMax"; }
66 const vector<bool>& propagate_down,
const vector<
Blob<Dtype>*>& bottom) {
77 #endif // CAFFE_ARGMAX_LAYER_HPP_
virtual int ExactNumTopBlobs() const
Returns the exact number of top blobs required by the layer, or -1 if no exact number is required.
Definition: argmax_layer.hpp:47
ArgMaxLayer(const LayerParameter ¶m)
Definition: argmax_layer.hpp:38
virtual void Backward_cpu(const vector< Blob< Dtype > * > &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > * > &bottom)
Not implemented (non-differentiable function)
Definition: argmax_layer.hpp:65
A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers,...
Definition: blob.hpp:24
virtual void Forward_cpu(const vector< Blob< Dtype > * > &bottom, const vector< Blob< Dtype > * > &top)
Definition: argmax_layer.cpp:55
An interface for the units of computation which can be composed into a Net.
Definition: layer.hpp:33
virtual int ExactNumBottomBlobs() const
Returns the exact number of bottom blobs required by the layer, or -1 if no exact number is required.
Definition: argmax_layer.hpp:46
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: argmax_layer.cpp:11
virtual const char * type() const
Returns the layer type.
Definition: argmax_layer.hpp:45
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: argmax_layer.cpp:33
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
Compute the index of the max values for each datum across all dimensions .
Definition: argmax_layer.hpp:24