public override Neuron CopyNeuronTo(Neuron neuron) { DropoutNeuron dropoutNeuron = neuron as DropoutNeuron; mask.CopyTo(dropoutNeuron.mask, 0); Cells.CopyTo(dropoutNeuron.Cells, 0); return(dropoutNeuron); }
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]; } } }
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]; } } }