ConvNet  1.0
A GPU-based C++ implementation of Convolutional Neural Nets
 All Classes Namespaces Functions Variables
fc_edge.h
1 #ifndef FC_EDGE_H_
2 #define FC_EDGE_H_
3 #include "edge_with_weight.h"
4 
6 class FCEdge : public EdgeWithWeight {
7  public:
8  FCEdge(const config::Edge& edge_config);
9  virtual void AllocateMemory(bool fprop_only);
10  virtual void ComputeUp(Matrix& input, Matrix& output, bool overwrite);
11  virtual void ComputeDown(Matrix& deriv_output, Matrix& input,
12  Matrix& output, Matrix& deriv_input, bool overwrite);
13  virtual void ComputeOuter(Matrix& input, Matrix& deriv_output);
14 
15  private:
16  void AllocateMemoryBprop();
17  void AllocateMemoryFprop();
18 };
19 #endif
virtual void AllocateMemory(bool fprop_only)
Allocate memory for the model.
Definition: fc_edge.cc:26
A GPU matrix class.
Definition: matrix.h:11
virtual void ComputeOuter(Matrix &input, Matrix &deriv_output)
Computes the gradient for the weights and biases.
Definition: fc_edge.cc:70
Implements a fully-connected edge.
Definition: fc_edge.h:6
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: fc_edge.cc:55
virtual void ComputeUp(Matrix &input, Matrix &output, bool overwrite)
Computes the output layer state given the input.
Definition: fc_edge.cc:38
Base class for all edges which have weights.
Definition: edge_with_weight.h:9