Course 4, week 3 assignment 2: Adding a dropout layer

“Add a dropout layer, with the variable dropout_prob as parameter”
Did we learn how to do that?

Dropout was covered in Course 2. There we learned how to implement dropout directly in numpy, but here we are programming in TF/Keras. Have you tried searching for “dropout” in the TF docs?

Yes, I meant implementing dropout with TF/Keras. In course 2 (nupy) it was pretty straightforward and well explained including many hints. I have searched for “dropout” in the TF docs, but I am a little at a loss.

Here’s the relevant docpage. Are you familiar with how to use “Layer” functions in TF/Keras? We’ve used them starting in the second assignment in C4 W1. Here’s a thread which talks in more detail about how the Sequential and Functional models work in Keras.

The one key thing to note is that this API uses the “drop” probability, instead of the “keep” probability as Prof Ng had us do it when we built it for ourselves in C2 W1.

1 Like

Thank you, I will try to learn and apply accordingly.