Learning rate missing

I am doing programming assignment in week 3 and I have realized when we train our model, learning rate is not provided as input.

Why is it not included?


Hello Ali Mardan,

You have already updated the parameters in exercise 7 and here you are running the test model on planar dataset based on what you have achieved and learnt.

@Ali_Mardan_Khan It’s a good thought, and remember that all the TensorFlow optimizers have a default value assigned if you don’t otherwise assign one. If it is important for your model architecture or data, assign it explicitly yourself! See for example:




A Tensor, floating point value, or a schedule that is atf.keras.optimizers.schedules.LearningRateSchedule, or a callable that takes no arguments and returns the actual value to use. The learning rate. Defaults to 0.01.

1 Like

Have a look at the definition of the update_parameters function: the function declaration includes a default value for the learning rate parameter. So if we do not pass in a value for that “named parameter” in python, then the declared default value will be used. If you are not familiar with the syntax and semantics of “named parameters” in python, the relevant search terms there would be … wait for it … “python named parameters”. :nerd_face:

Thanks everyone for reply. I have got it now.