Your question is Neural Network Forward Pass in NumPy. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a simple neural network forward pass in NumPy.
Use fully connected layers, apply ReLU after every hidden layer, and apply numerically stable softmax to the final logits. The function receives X as a batch matrix, weights as matrices shaped (input_dim, output_dim), and biases as vectors. Return the output probabilities as a nested Python list with one row per input example.
Example: X = [[0, 0]], one zero-weight layer produces [[0.5, 0.5]]. A network with negative hidden activations must apply ReLU before the next layer.
def neural_network_forward(X, weights, biases):