Complete train_simple_cnn_with_backprop(X, y, epochs, learning_rate, kernel_size=3, num_filters=1). X has shape (n_samples, height, width) (grayscale) and y is one-hot with shape (n_samples, num_classes). Keep the starter's initialization unchanged: W_conv of shape (kernel_size, kernel_size, num_filters) is drawn first, then W_dense of shape (flattened_size, num_classes), both np.random.randn(...) * 0.01, biases zero. The tests call np.random.seed(42) right before the function, so this order fixes the expected numbers.
Forward pass for one image:
(height-kernel_size+1, width-kernel_size+1, num_filters).(h, w, filter) array in row-major (C) order.Training: plain SGD with batch size 1. In each epoch visit the samples in order and, after each one, update all four parameters with the exact cross-entropy gradients: (no momentum, no averaging).
Return the tuple (W_conv, b_conv, W_dense, b_dense) as NumPy arrays; the tests print it and compare the values.