1 #ifndef MAXPOOL_EDGE_H_
2 #define MAXPOOL_EDGE_H_
16 virtual bool RequiresMemoryForDeriv()
const {
return true; }
19 int GetKernelSize()
const {
return kernel_size_; }
20 int GetStride()
const {
return stride_; }
21 int GetPadding()
const {
return padding_; }
24 int kernel_size_, stride_, padding_;
virtual void SetImageSize(int image_size)
Set the spatial size of the input to this edge.
Definition: maxpool_edge.cc:19
virtual void ComputeUp(Matrix &input, Matrix &output, bool overwrite)
Computes the output layer state given the input.
Definition: maxpool_edge.cc:36
This class is intended to be used as a base class for implementing edges.
Definition: edge.h:13
virtual void AllocateMemory(bool fprop_only)
Allocate memory for the model.
Definition: maxpool_edge.cc:24
virtual void ComputeDown(Matrix &deriv_output, Matrix &input, Matrix &output, Matrix &deriv_input, bool overwrite)
Computes the derivative w.r.t the inputs of this edge given the derivative w.r.t the outputs of this ...
Definition: maxpool_edge.cc:45
virtual void SetTiedTo(Edge *e)
Sets the edge to be tied to another edge.
Definition: maxpool_edge.cc:10
A GPU matrix class.
Definition: matrix.h:11
virtual int GetNumModules() const
Returns the number of modules.
Definition: maxpool_edge.h:15
Implements a Max-pool edge.
Definition: maxpool_edge.h:6