ConvNet  1.0
A GPU-based C++ implementation of Convolutional Neural Nets
 All Classes Namespaces Functions Variables
rgb_to_yuv_edge.h
1 #ifndef RGB_TO_YUV_EDGE_H_
2 #define RGB_TO_YUV_EDGE_H_
3 #include "edge.h"
4 
6 class RGBToYUVEdge : public Edge {
7  public:
8  RGBToYUVEdge(const config::Edge& edge_config);
9  virtual void AllocateMemory(int image_size);
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 int GetNumModules() const { return image_size_; }
14 
15  private:
16  int image_size_;
17 };
18 #endif
This class is intended to be used as a base class for implementing edges.
Definition: edge.h:13
virtual void ComputeUp(Matrix &input, Matrix &output, bool overwrite)
Computes the output layer state given the input.
Definition: rgb_to_yuv_edge.cc: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: rgb_to_yuv_edge.cc:17
virtual int GetNumModules() const
Returns the number of modules.
Definition: rgb_to_yuv_edge.h:13
A GPU matrix class.
Definition: matrix.h:11
Implements an edge that maps RGB to YUV.
Definition: rgb_to_yuv_edge.h:6