コード例 #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;
 }
コード例 #3
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;
        }
コード例 #4
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;
        }
コード例 #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
ファイル: Network.cs プロジェクト: Lxrd-AJ/machine-learning
        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
ファイル: Neuron.cs プロジェクト: Lxrd-AJ/machine-learning
 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) { }
コード例 #10
0
 public HiddenNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo)
 {
 }
コード例 #11
0
 public OutputNeuron(Activation activation, TrainingInfo trainInfo)
     : base(activation, trainInfo)
 {
 }
コード例 #12
0
 public Neuron(Activation activation, TrainingInfo trainInfo)
 {
     this.activation = activation;
     this.trainInfo  = trainInfo;
 }