public NetLayer(int size, int inputsCount, double randMin, double randMax, ActivationFunctions.Func activationFunc) { this.neurons = new Neuron[size]; for (int i = 0; i < size; ++i) { neurons[i] = new Neuron(inputsCount, randMin, randMax, activationFunc); } }
public Neuron(int size, double weightMin, double weightMax, ActivationFunctions.Func activationFunc) { this.weightsVector = NetVector.Randomize(size + 1, weightMin, weightMax); this.activationFunc = activationFunc; }
public Neuron(NetVector weightsVector, ActivationFunctions.Func activationFunc) { this.weightsVector = weightsVector; this.activationFunc = activationFunc; }