public void SetWeights(List <float> weights) { int pos = 0; foreach (var layer in hiddenLayers) { layer.SetWeights(weights, ref pos); } outputLayer.SetWeights(weights, ref pos); }