Week 3,Programming Assignment


  1. I understood how n_h came to be 4 as a hidden layer in 4 but I don’t understand how n_x=5 and n_y=2.

2.Please explaining with all details.
Thankyou

Because the test data has been constructed in that way:

t_X, t_Y = layer_sizes_test_case()
print(t_X.shape, t_Y.shape)

outputs

(5, 3) (2, 3)

We are given m = 3 examples.

M is 400 examples can you please explain in detail I cannot understand. Thankyou…

In the Planar Data Classification, the dataset has been created with num_features x num_examples, so the last dimension represents the number of examples, commonly referred to as m. Sometimes the dataset is created transposed, so you have num_examples x num_features. Usually that is the preferred format for TensorFlow.

1 Like

So, we will take out n_x,n_y using python.
We can’t have intuition to know it , like we got to know of n_h ?
Thank You.

Every dataset is created differently. You can read the docs for the dataset or inspect if yourself. In real life you might have to visualize it yourself and figure out dimensions and how it is created.

Can you guide me on how to read the docs of the dataset?

In this case, the docs are the assignment. The general strategy is to visualize visualize visualize. So play around with the dataset and learn what it includes.

1 Like