3 #include "edge_with_weight.h"
8 ConvEdge(
const config::Edge& edge_config);
20 int GetKernelSize()
const {
return kernel_size_; }
21 int GetStride()
const {
return stride_; }
22 int GetPadding()
const {
return padding_; }
23 int GetPartialSum()
const {
return partial_sum_; }
24 bool GetSharedBias()
const {
return shared_bias_; }
27 void AllocateMemoryBprop();
28 void AllocateMemoryFprop();
30 Matrix grad_weights_partial_sum_;
31 int kernel_size_, stride_, padding_, partial_sum_;
virtual void SetTiedTo(Edge *e)
Sets the edge to be tied to another edge.
Definition: conv_edge.cc:13
virtual void SetImageSize(int image_size)
Set the spatial size of the input to this edge.
Definition: conv_edge.cc:25
virtual void ComputeOuter(Matrix &input, Matrix &deriv_output)
Computes the gradient for the weights and biases.
Definition: conv_edge.cc:159
virtual void DisplayWeights()
Displays the weights.
Definition: conv_edge.cc:40
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: conv_edge.cc:47
virtual void ComputeUp(Matrix &input, Matrix &output, bool overwrite)
Computes the output layer state given the input.
Definition: conv_edge.cc:116
A GPU matrix class.
Definition: matrix.h:11
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: conv_edge.cc:138
virtual int GetNumModules() const
Returns the number of modules.
Definition: conv_edge.h:17
Implements a convolutional edge.
Definition: conv_edge.h:6
Base class for all edges which have weights.
Definition: edge_with_weight.h:9