Neural
fc_layer.h
Go to the documentation of this file.
1 
7 #pragma once
8 #ifndef FC_LAYER_H
9 #define FC_LAYER_H
10 
11 #include <iostream>
12 #include <eigen3/Eigen/Dense>
13 #include <EigenRand/EigenRand>
14 #include "layer.h"
15 #include <chrono>
16 
17 namespace Neural
18 {
19  class Fc_Layer : public Layer
20  {
21 
22  public:
23  Fc_Layer(int i ,int j);
24  Fc_Layer(Eigen::MatrixXd weights ,Eigen::MatrixXd bias);
25 
26  virtual Eigen::MatrixXd Forward_propagation(Eigen::MatrixXd input);
27  virtual Eigen::MatrixXd Backward_propagation(Eigen::MatrixXd output_error, float learning_rate);
28  virtual Json::Value toJSON();
29 
30  Eigen::MatrixXd GetWeights();
31  Eigen::MatrixXd GetBias();
32 
33  void SetWeights(Eigen::MatrixXd weights);
34  void SetBias(Eigen::MatrixXd weights);
35 
36  protected:
37  Eigen::MatrixXd m_weights;
38  Eigen::MatrixXd m_bias;
39  };
40 }
41 #endif
Neural::Fc_Layer
Definition: fc_layer.h:19
Neural::Fc_Layer::Forward_propagation
virtual Eigen::MatrixXd Forward_propagation(Eigen::MatrixXd input)
Definition: fc_layer.cpp:50
Neural::Fc_Layer::m_weights
Eigen::MatrixXd m_weights
Definition: fc_layer.h:37
layer.h
This class is the Base class for all Layers types.
Neural::Fc_Layer::m_bias
Eigen::MatrixXd m_bias
Definition: fc_layer.h:38
Neural::Fc_Layer::SetBias
void SetBias(Eigen::MatrixXd weights)
Definition: fc_layer.cpp:127
Neural::Fc_Layer::SetWeights
void SetWeights(Eigen::MatrixXd weights)
Definition: fc_layer.cpp:123
Neural::Fc_Layer::Fc_Layer
Fc_Layer(int i, int j)
Definition: fc_layer.cpp:25
Neural::Layer
Definition: layer.h:18
Neural::Fc_Layer::toJSON
virtual Json::Value toJSON()
Definition: fc_layer.cpp:83
Neural::Fc_Layer::GetWeights
Eigen::MatrixXd GetWeights()
Definition: fc_layer.cpp:115
Neural::Fc_Layer::GetBias
Eigen::MatrixXd GetBias()
Definition: fc_layer.cpp:119
Neural::Fc_Layer::Backward_propagation
virtual Eigen::MatrixXd Backward_propagation(Eigen::MatrixXd output_error, float learning_rate)
Definition: fc_layer.cpp:64
Neural
Definition: activation.h:10