A dropout mask is to be used can be applied to the layers by multiplying a tensor of the same size elementwise, this comes in your forward() method so as to apply for the layers irrespective of the input
When you create a dropout mask and apply it to forward propagations the neurons will be inactive or ‘0’. so, while calculating the gradients it will not propagate back through the dropout mask
Dropout can’t be used on output layers