Пример #1
0
        public override Neuron CopyNeuronTo(Neuron neuron)
        {
            DropoutNeuron dropoutNeuron = neuron as DropoutNeuron;

            mask.CopyTo(dropoutNeuron.mask, 0);
            Cells.CopyTo(dropoutNeuron.Cells, 0);

            return(dropoutNeuron);
        }
Пример #2
0
        public override void SetNeuron(Neuron neuron)
        {
            DropoutNeuron dropoutNeuron = neuron as DropoutNeuron;

            dropoutNeuron.Cells.CopyTo(Cells, 0);
            for (int i = 0; i < LayerSize; i++)
            {
                if (dropoutNeuron.mask[i])
                {
                    Errs[i] = 0;
                }
                else
                {
                    Errs[i] = neuron.Errs[i];
                }
            }
        }
Пример #3
0
        public override void PreUpdateWeights(Neuron neuron, float[] errs)
        {
            DropoutNeuron dropoutNeuron = neuron as DropoutNeuron;

            dropoutNeuron.Cells.CopyTo(Cells, 0);
            for (int i = 0; i < LayerSize; i++)
            {
                if (dropoutNeuron.mask[i])
                {
                    Errs[i] = 0;
                }
                else
                {
                    Errs[i] = errs[i];
                }
            }
        }