Accord.Neuro.ActivationNetwork.ActivationNetwork C# (CSharp) Method

ActivationNetwork() public method

Initializes a new instance of the ActivationNetwork class.
The new network is randomized (see ActivationNeuron.Randomize method) after it is created.
public ActivationNetwork ( IActivationFunction function, int inputsCount ) : System
function IActivationFunction Activation function of neurons of the network.
inputsCount int Network's inputs count.
return System
        public ActivationNetwork(IActivationFunction function, int inputsCount, params int[] neuronsCount)
            : base(inputsCount, neuronsCount.Length)
        {
            // create each layer
            for (int i = 0; i < layers.Length; i++)
            {
                layers[i] = new ActivationLayer(
                    // neurons count in the layer
                    neuronsCount[i],
                    // inputs count of the layer
                    (i == 0) ? inputsCount : neuronsCount[i - 1],
                    // activation function of the layer
                    function);
            }
        }