示例#1
0
 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;
 }
示例#2
0
 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;
 }
        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;
        }
示例#5
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();
        }
示例#6
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();
        }
示例#7
0
 public Neuron(Activation activation, TrainingInfo trainInfo)
 {
     this.activation = activation;
     this.trainInfo = trainInfo;
 }
示例#8
0
 public HiddenNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo) { }
示例#9
0
 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)
 {
 }
示例#12
0
 public Neuron(Activation activation, TrainingInfo trainInfo)
 {
     this.activation = activation;
     this.trainInfo  = trainInfo;
 }