Issue with Forward Propagation and Parameter Initialization in Week 3 Assignment
Hello everyone,
I’m currently working on the Week 3 programming assignment i.e. Planar Data Classification with One Hidden Layer, specifically on the forward propagation function part. I’m facing an issue where the values of A2
do not match the expected output provided by the grader.
Issue:
- Shape Issue: The shape of
A2
seems correct (1, 3), but the values do not match the expected output from the grader function. - Parameter Initialization: I’ve ensured that parameters are initialized with small random values.
- Expected Results: The values of
A2
should match exactly with the expected output in the grader, but I’m getting different results despite the shapes aligning.
What I’ve Tried:
- Used
np.random.seed(2)
for consistent random initialization. - Verified the shapes of the parameter matrices (e.g.,
W1
,W2
,b1
,b2
) and the intermediate outputs (e.g.,Z1
,A1
,Z2
). - Added assertions to check for shape consistency, but the values of
A2
still don’t match.
Has anyone else faced similar issues where the values of A2
don’t match the expected results even though the shapes are correct? If yes, what specific details should I focus on when trying to match the output values exactly?
Any help or suggestions would be greatly appreciated!