I wonder about shape of A2 on assignment

Planar_data_classification_with_one_hidden_layer assignment


In forward_propagation function why does A2 get shape = (1,3) why does it not get shape = (1,1)?

It appears the shape is controlled by the “parameters” argument that is returned by the forward_propagation_test_case() function. Then “parameters” is passed to the forward_propagation() function.

You can read the test case function by opening the corresponding .py file from the File menu.
The file name is identified in one of the imports in the first cell of the notebook.

Tom has shown you how to figure out the dimensions of the test case inputs, which will then determine the shapes of the output values at each layer. In general, the second dimension of any of the Z^{[l]} or A^{[l]} values will be m, which is the number of input samples in the data that is used. We write all our forward and backprop logic to handle batches of data (not single samples) for efficiency: all the calculations are vectorized across the samples.