Documentation of 'org.encog.neural.networks.layers.BasicLayer' Java class
BasicLayer
org.encog.neural.networks.layers

Class BasicLayer

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


    public class BasicLayer
    extends FlatLayer
    implements Layer, java.io.Serializable
    Basic functionality that most of the neural layers require. The basic layer is often used by itself to implement forward or recurrent layers. Other layer types are based on the basic layer as well. The following summarizes how basic layers calculate the output for a neural network. Example of a simple XOR network. Input: BasicLayer: 2 Neurons, null biasWeights, null biasActivation Hidden: BasicLayer: 2 Neurons, 2 biasWeights, 1 biasActivation Output: BasicLayer: 1 Neuron, 1 biasWeights, 1 biasActivation Input1Output and Input2Output are both provided. Synapse 1: Input to Hidden Hidden1Activation = (Input1Output * Input1→Hidden1Weight) + (Input2Output * Input2→Hidden1Weight) + (HiddenBiasActivation * Hidden1BiasWeight) Hidden1Output = calculate(Hidden1Activation, HiddenActivationFunction) Hidden2Activation = (Input1Output * Input1→Hidden2Weight) + (Input2Output * Input2→Hidden2Weight) + (HiddenBiasActivation * Hidden2BiasWeight) Hidden2Output = calculate(Hidden2Activation, HiddenActivationFunction) Synapse 2: Hidden to Output Output1Activation = (Hidden1Output * Hidden1→Output1Weight) + (Hidden2Output * Hidden2→Output1Weight) + (OutputBiasActivation * Output1BiasWeight) Output1Output = calculate(Output1Activation, OutputActivationFunction)
    See Also:
    Serialized Form
    • Constructor Detail

      • BasicLayer

        public BasicLayer(ActivationFunction activationFunction,
                          boolean hasBias,
                          int neuronCount,
                          double dropoutRate)
        Construct this layer with a non-default activation function, also determine if a bias is desired or not.
        Parameters:
        activationFunction - The activation function to use.
        neuronCount - How many neurons in this layer.
        hasBias - True if this layer has a bias.
        dropoutRate - The dropout rate for this layer
      • BasicLayer

        public BasicLayer(ActivationFunction activationFunction,
                          boolean hasBias,
                          int neuronCount)
      • BasicLayer

        public BasicLayer(int neuronCount)
        Construct this layer with a sigmoid activation function.
        Parameters:
        neuronCount - How many neurons in this layer.
    • Method Detail

      • getNetwork

        public BasicNetwork getNetwork()
        Specified by:
        getNetwork in interface Layer
        Returns:
        The network that owns this layer.
      • setNetwork

        public void setNetwork(BasicNetwork network)
        Set the network for this layer.
        Specified by:
        setNetwork in interface Layer
        Parameters:
        network - The network for this layer.
      • getNeuronCount

        public int getNeuronCount()
        Specified by:
        getNeuronCount in interface Layer
        Returns:
        The neuron count.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.