# Deep network: Layer::FullConnectedLayer Class Reference

Layer::FullConnectedLayer Class Reference

`#include <full_connected.hpp>`

Inheritance diagram for Layer::FullConnectedLayer:
[legend]

## Public Member Functions

| FullConnectedLayer (size_t n, size_t m)
| ~FullConnectedLayer ()
void | init_standard ()
void | init (Real mu, Real sigma)
Vector | feed_forward (Vector x) override
void | init_nabla () override
Vector | back_propagation (Vector e) override
void | update (Real eta) override
Public Member Functions inherited from Layer::Layer
| Layer (size_t n, size_t m)
| ~Layer ()
size_t | get_input_size () const
size_t | get_output_size () const
Vector | get_output () const
virtual Vector | feed_forward (Vector x)=0
virtual void | init_nabla ()=0
virtual Vector | back_propagation (Vector e)=0
virtual void | update (Real eta)=0

## Public Attributes

Vector | b
Vector | w
Vector | nabla_b
Vector | nabla_w
Public Attributes inherited from Layer::Layer
string | name
size_t | n
size_t | m
Vector | x
Vector | y
Vector | d

## Constructor & Destructor Documentation

## FullConnectedLayer()

Layer::FullConnectedLayer::FullConnectedLayer | ( | size_t | n,
|  | size_t | m
| ) |  |

## ~FullConnectedLayer()

Layer::FullConnectedLayer::~FullConnectedLayer | ( |  | ) |

## Member Function Documentation

## back_propagation()

Vector Layer::FullConnectedLayer::back_propagation | ( | Vector | e | ) |

overridevirtual

Apply back propagation algorithm on the delta output vector d. Used the input vector stored in x_in_ref during feedforward. Return a reference to the computed (and stored) input delta vector. Nabla vectors must be computed here.

Implements Layer::Layer.

## feed_forward()

Vector Layer::FullConnectedLayer::feed_forward | ( | Vector | x | ) |

overridevirtual

Apply the layer to the input vector `x`. Vectors `x_in_ref` and `x_out` must be updated in consequence. Return a reference to x_out.

Implements Layer::Layer.

## init()

void Layer::FullConnectedLayer::init | ( | Real | mu,
|  | Real | sigma
| ) |  |

## init_nabla()

void Layer::FullConnectedLayer::init_nabla | ( |  | ) |

overridevirtual

Initialize nabla vectors which are used during gradient descent.

Implements Layer::Layer.

## init_standard()

void Layer::FullConnectedLayer::init_standard | ( |  | ) |

## update()

void Layer::FullConnectedLayer::update | ( | Real | eta | ) |

overridevirtual

Update layer parameters using gradient descent algorithm with learning rate eta.

Implements Layer::Layer.

## Member Data Documentation

## b

Vector Layer::FullConnectedLayer::b

## nabla_b

Vector Layer::FullConnectedLayer::nabla_b

## nabla_w

Vector Layer::FullConnectedLayer::nabla_w

## w

Vector Layer::FullConnectedLayer::w

The documentation for this class was generated from the following files:

- src/layers/full_connected.hpp
- src/layers/full_connected.cpp