def forward_pass(X, W1, b1, W2, b2): """Complete forward pass through the network""" # Hidden layer z1 = X @ W1 + b1 # Linear transformation a1 = sigmoid(z1) # Activation # Output layer z2 = a1 @ W2 + b2 # Linear transformation a2 = sigmoid(z2) # Activation return z1, a1, z2, a2 # Test forward pass z1, a1, z2, predictions = forward_pass(X, W1, b1, W2, b2) print(f"Predictions shape: {predictions.shape}") print(f"Predictions:\n{predictions.flatten()}") print(f"Actual labels:\n{y.flatten()}")