Dropout zeroes random units during training, so the backward pass must treat those units the same way: a unit that was dropped in the forward pass contributed nothing to the output, so it receives no gradient.
Implement dropout_backward(grad_out, keep_mask, p), which multiplies the incoming gradient by the same mask and rescale used in the forward pass.
keep_mask has the same shape as grad_out.0 <= p < 1.Use the exact mask and scale from the forward pass. Dropped units get a gradient of zero; kept units get the same 1 / (1 - p) factor.
No results yet
Run your code to check it against the examples, or submit to run every test.