Link Search Menu Expand Document

Fully Connected layer

Presentation

This layer is the most common and simple layer, almost all neural network have once or more. The fully connected layer is a layer with simple neuron where all neurons is connected to all input.

Declaration

This is the function used to declare a fully connected layer.

template <class ... TOptimizer>
LayerModel FullyConnected(int numberOfNeurons, activation activation = activation::sigmoid, TOptimizer ... optimizers);

Arguments

Here is an example of neural networks with 3 fully connected layer.

StraightforwardNeuralNetwork neuralNetwork({
        Input(28, 28, 1),
        FullyConnected(150, activation::ReLu),
        FullyConnected(70, activation::tanh),
        FullyConnected(10)
    });

See an example of GRU layer on dataset