3 #include "edge_with_weight.h"
8 LocalEdge(
const config::Edge& edge_config);
21 int GetKernelSize()
const {
return kernel_size_; }
22 int GetStride()
const {
return stride_; }
23 int GetPadding()
const {
return padding_; }
26 void AllocateMemoryBprop();
27 void AllocateMemoryFprop();
29 int kernel_size_, stride_, padding_;
virtual void ComputeUp(Matrix &input, Matrix &output, bool overwrite)
Computes the output layer state given the input.
Definition: local_edge.cc:80
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: local_edge.cc:53
virtual int GetNumModules() const
Returns the number of modules.
Definition: local_edge.h:18
A GPU matrix class.
Definition: matrix.h:11
Implements a locally connected edge.
Definition: local_edge.h:6
virtual void ComputeOuter(Matrix &input, Matrix &deriv_output)
Computes the gradient for the weights and biases.
Definition: local_edge.cc:111
virtual void DisplayWeights()
Displays the weights.
Definition: local_edge.cc:19
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: local_edge.cc:95
virtual void SetImageSize(int image_size)
Set the spatial size of the input to this edge.
Definition: local_edge.cc:26
virtual void SetTiedTo(Edge *e)
Sets the edge to be tied to another edge.
Definition: local_edge.cc:11
Base class for all edges which have weights.
Definition: edge_with_weight.h:9