AddHiddenLayer() public method

Add a hidden layer with the specified number of neurons.
public AddHiddenLayer ( int count ) : void
count int The number of neurons in this hidden layer.
return void
コード例 #1
0
 private IMLMethod CreateElmanNetwork()
 {
     // construct an Elman type network
     var pattern = new ElmanPattern();
     pattern.ActivationFunction = new ActivationSigmoid();
     pattern.InputNeurons = 1;
     pattern.AddHiddenLayer(6);
     pattern.OutputNeurons = 1;
     return pattern.Generate();
 }
コード例 #2
0
        public static IMLMethod CreateElmanNetwork(int inputsize, int outputsize)
        {
            // construct an Elman type network
            ElmanPattern pattern = new ElmanPattern();

            pattern.ActivationFunction = new ActivationTANH();
            pattern.InputNeurons = inputsize;

            pattern.AddHiddenLayer(0);
            pattern.OutputNeurons = outputsize;
            return pattern.Generate();
        }
コード例 #3
0
ファイル: NetworkUtility.cs プロジェクト: jongh0/MTree
 /// <summary>
 ///     Creates the elman network as a basicnetwork.
 ///     This method create a elmhan patterns but returns a basic network (ready for load/save).
 /// </summary>
 /// <param name="inputsize">The inputsize.</param>
 /// <param name="outputsize">The outputsize.</param>
 /// <param name="hiddenlayers">The hiddenlayers.</param>
 /// <param name="activate">The activation function to use..</param>
 /// <returns>a basic network</returns>
 public static BasicNetwork CreateElmanNetwork(int inputsize, int outputsize, int hiddenlayers,
                                               IActivationFunction activate)
 {
     // construct an Elman type network
     var pattern = new ElmanPattern {ActivationFunction = activate, InputNeurons = inputsize};
     pattern.AddHiddenLayer(hiddenlayers);
     pattern.OutputNeurons = outputsize;
     return (BasicNetwork) pattern.Generate();
 }
コード例 #4
0
 private IMLMethod CreateElmanNetwork(int input)
 {
     // construct an Elman type network
     var pattern = new ElmanPattern
     {
         InputNeurons = input
     };
     pattern.AddHiddenLayer(2);
     pattern.OutputNeurons = 1;
     return pattern.Generate();
 }