Class FullyConnectedLayer

  • All Implemented Interfaces:
    Layer, java.io.Serializable

    public final class FullyConnectedLayer
    extends AbstractLayer
    Fully connected layer is used as hidden layer in the neural network, and it has a single row of units/nodes/neurons connected to all neurons in previous and next layer. Previous connected layer can be input fully connected, convolutional or max pooling layer, while next layer can be fully connected or output layer. This layer calculates weighted sum of outputs from the previous layers, and applies activation function to that sum.
    Author:
    Zoran Sevarac
    See Also:
    ActivationType, ActivationFunction, Serialized Form
    • Constructor Detail

      • FullyConnectedLayer

        public FullyConnectedLayer​(int width)
        Creates an instance of fully connected layer with specified width (number of neurons) and ReLU activation function.
        Parameters:
        width - layer width / number of neurons in this layer
      • FullyConnectedLayer

        public FullyConnectedLayer​(int width,
                                   ActivationType actType)
        Creates an instance of fully connected layer with specified width (number of neurons) and activation function type.
        Parameters:
        width - layer width / number of neurons in this layer
        actType - activation function type to use in this layer
        See Also:
        ActivationFunctions