Exemplo n.º 1
0
        public Network(Activation activation, TrainingInfo trainInfo, int inputSize, int[] hiddenSizes, int outputSize)
        {
            this.InputSize = inputSize;
            this.HiddenSizes = hiddenSizes;
            this.OutputSize = outputSize;

            this.activation = activation;
            this.inputLayer = new InputLayer(inputSize);
            this.hiddenLayers = hiddenSizes
                .Select(size => new HiddenLayer(activation, trainInfo, size))
                .ToArray();
            this.outputLayer = new OutputLayer(activation, trainInfo, outputSize);
            ConnectLayers();
        }