In the previous question we have been calculated (input layer)n_x =5
and the now parameter(n_x) when given to function is n_x=2 .
could anyone support why the n_x value changed ?
PFB Function and their parameteres
def initialize_parameters(n_x, n_h, n_y):
Salam Alykum TMosh ,
Please find below 2 snap ,First Pic n_x=5 but when we are continue the task in the next question the n_x=2 ?how can we continue the whole task if parameters is not fixed .
I know that, but in the previous function called :(def layer_sizes(X, Y)
n_x=5, So can you please tell me what 's the benefits of value changing for n_x=2 in the initialize_parametes(x,h,y).
why we are not keep n_x=5 for all the previous and current function as the same.
Thank you for your fast reply ,Appreciated .
This is an example of setting the number of input and output units based on the shapes of the data set.
But this does not work for setting the number of hidden layer units, because that is a design decision that does not depend on the X inputs or the Y outputs.
Thank you for responding but i have crucial question how can we calculate Hidden layer count in real dataset? please check function
inside Exercise 3 initialize_parameters
n_x, n_h, n_y = initialize parameters test_case()
also give us n_h=4 ,
how can be n_h=4 for both exercise and they mentioned that will be applied only in the excercie 2 ?
You can’t calculate the number of hidden layer units from the dataset.
This is because the dataset only gives the inputs to the first first layer, and the labels from the output layer.
The number of hidden layer units is a design decision that you make as the machine learning engineer. You select the number of hidden layer units such that you get “good enough” performance.