private void RandomizeNetwork()
        {
            Neuron.RandRange = new Range <double>(0, 255);

            // randomize net
            nt.Randomize();
        }
示例#2
0
        // Radnomize weights of network
        private void RandomizeNetwork( )
        {
            Neuron.RandRange = new Range(0, 255);

            // randomize net
            network.Randomize( );

            // update map
            UpdateMap( );
        }
示例#3
0
        // Randomize weights of network
        private void RandomizeNetwork()
        {
            if (network != null)
            {
                foreach (var neuron in (network?.Layers.SelectMany(layer => layer?.Neurons)).Where(neuron => neuron != null))
                {
                    neuron.RandGenerator = new UniformContinuousDistribution(new Range(0, 255));
                }

                network?.Randomize();
            }

            UpdateMap();
        }
示例#4
0
        // Randomize weights of network
        private void RandomizeNetwork()
        {
            // set random generators range
            foreach (var layer in network.Layers)
            {
                foreach (var neuron in layer.Neurons)
                {
                    neuron.RandGenerator = new UniformContinuousDistribution(new Range(0, 255));
                }
            }

            // randomize net
            network.Randomize();

            // update map
            UpdateMap();
        }