MLP constructor
Implementation
MLP(int nin, List<int> nouts) {
List<int> dims = [nin, ...nouts];
for (int i = 0; i < nouts.length; i++) {
// The last layer usually shouldn't have ReLU if it's for regression/logits
bool isLast = i == nouts.length - 1;
layers.add(Layer(dims[i], dims[i + 1], useGelu: !isLast));
}
}