ChangeNeuronCount() 공개 메소드

Change the neuron count for the network. If the count is increased then a zero-weighted neuron is added, which will not affect the output of the neural network. If the neuron count is decreased, then the weakest neuron will be removed. This method cannot be used to remove a bias neuron.
public ChangeNeuronCount ( int layer, int neuronCount ) : void
layer int The layer to adjust.
neuronCount int The new neuron count for this layer.
리턴 void
        public void TestIncreaseNeuronCountHidden2()
        {
            BasicNetwork   network = EncogUtility.SimpleFeedForward(5, 6, 0, 2, true);
            PruneSelective prune   = new PruneSelective(network);

            prune.ChangeNeuronCount(1, 60);

            BasicMLData  input = new BasicMLData(5);
            BasicNetwork model = EncogUtility.SimpleFeedForward(5, 60, 0, 2, true);

            CheckWithModel(model.Structure.Flat, network.Structure.Flat);
            model.Compute(input);
            network.Compute(input);
        }
        public void TestIncreaseNeuronCountHidden()
        {
            BasicNetwork network = XOR.CreateTrainedXOR();

            Assert.IsTrue(XOR.VerifyXOR(network, 0.10));
            PruneSelective prune = new PruneSelective(network);

            prune.ChangeNeuronCount(1, 5);

            BasicNetwork model = EncogUtility.SimpleFeedForward(2, 5, 0, 1, false);

            CheckWithModel(model.Structure.Flat, network.Structure.Flat);

            Assert.IsTrue(XOR.VerifyXOR(network, 0.10));
        }
        public void TestIncreaseNeuronCountHidden()
        {
            BasicNetwork network = XOR.CreateTrainedXOR();
            Assert.IsTrue(XOR.VerifyXOR(network, 0.10));
            PruneSelective prune = new PruneSelective(network);
            prune.ChangeNeuronCount(1, 5);

            BasicNetwork model = EncogUtility.SimpleFeedForward(2, 5, 0, 1, false);
            CheckWithModel(model.Structure.Flat, network.Structure.Flat);

            Assert.IsTrue(XOR.VerifyXOR(network, 0.10));
        }
        public void TestIncreaseNeuronCountHidden2()
        {
            BasicNetwork network = EncogUtility.SimpleFeedForward(5, 6, 0, 2, true);
            PruneSelective prune = new PruneSelective(network);
            prune.ChangeNeuronCount(1, 60);

            BasicMLData input = new BasicMLData(5);
            BasicNetwork model = EncogUtility.SimpleFeedForward(5, 60, 0, 2, true);
            CheckWithModel(model.Structure.Flat, network.Structure.Flat);
            model.Compute(input);
            network.Compute(input);
        }