public OutputLayer(Activation activation, TrainingInfo trainInfo, int size)
 {
     var neurons = new OutputNeuron[size];
     for (int i = 0; i < size; i++)
         neurons[i] = new OutputNeuron(activation, trainInfo);
     this.neurons = neurons;
 }
 public HiddenLayer(Activation activation, TrainingInfo trainInfo, int size)
 {
     var neurons = new Neuron[size + 1];
     for (int i = 0; i < size; i++)
         neurons[i] = new HiddenNeuron(activation, trainInfo);
     neurons[size] = new BiasNeuron();
     this.neurons = neurons;
 }
Exemple #3
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();
        }
Exemple #4
0
 public Neuron(Activation activation, TrainingInfo trainInfo)
 {
     this.activation = activation;
     this.trainInfo = trainInfo;
 }
 public HiddenNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo) { }
 public OutputNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo) { }
 public HiddenNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo)
 {
 }
 public OutputNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo)
 {
 }
 public Neuron(Activation activation, TrainingInfo trainInfo)
 {
     this.activation = activation;
     this.trainInfo  = trainInfo;
 }