forward method
Forward pass for the FFN.
Implementation
ValueVector forward(ValueVector x) {
// Apply: (Linear -> ReLU -> Linear)
final x1 = layer1.forward(x);
final x_relu = x1.reLU();
final x2 = layer2.forward(x_relu);
return x2;
}
Forward pass for the FFN.
ValueVector forward(ValueVector x) {
// Apply: (Linear -> ReLU -> Linear)
final x1 = layer1.forward(x);
final x_relu = x1.reLU();
final x2 = layer2.forward(x_relu);
return x2;
}