Accord.Neuro.Layers.StochasticLayer.CopyReversedWeightsFrom C# (CSharp) Method

CopyReversedWeightsFrom() public method

Copy the weights of another layer in reversed order. This can be used to update visible layers from hidden layers and vice-versa.
public CopyReversedWeightsFrom ( StochasticLayer layer ) : void
layer StochasticLayer The layer to copy the weights from.
return void
        public void CopyReversedWeightsFrom(StochasticLayer layer)
        {
            for (int i = 0; i < Neurons.Length; i++)
                for (int j = 0; j < inputsCount; j++)
                    this.Neurons[i].Weights[j] = layer.Neurons[j].Weights[i];
        }
    }