public void MapEachWeight(Network other, FunMap fun) { for (int i = 0; i < layers.Length; i++) { layers[i].MapEachWeight(fun, other.layers[i]); } }
public void MapEachWeight(FunMap fun, Layer other) { for (int i = 0; i < neuronNum; i++) { for (int j = 0; j < inputNum; j++) { weights[i].w[j] = fun(other.weights[i].w[j]); } { bias[i] = fun(other.bias[i]); } } }