Neuron.fromWeights constructor
Implementation
factory Neuron.fromWeights(int nin, {bool nonlin = true}) {
final w = List<Value>.generate(
nin,
(int index) => Value(
math.Random().nextDouble() * 0.1), // Example: small random values
growable: false);
Value b = Value(0.0); // Often good to initialize biases to 0
return Neuron(ValueVector(w), b: b, nonlin: true);
}