forward method
Implementation
Value forward(Iterable<Value> inputs) {
final act =
[
for (var i = 0; i < inputsCount; i++)
weights.elementAt(i) * inputs.elementAt(i),
].reduce((a, b) => a + b) +
bias;
return act.tanh();
}