I just wanted to confirm whether all the images in a mini-batch get the same dropout mask or not.
For clarification: Suppose a 1000 sized vector is passed through the Dropout layer with a mini batch size of 100. Now, the 21st and 31st elements of the 1st image's vector gets dropped out. Is it necessary that the 21st and 31st elements will get dropped for all the remaining 99 images in the batch? Or is it the case that every image gets a separate mask?
No, each image in a batch gets an independent, completely random mask.
Actually, the Dropout layer doesn't even care about the shape of its input: It counts the number of elements in the bottom Blob (i.e. for a batch size of 10 images, 3 channels and 224x224, it would be 10 * 3 * 224 * 224 = 1505280
), and generates the same number of independent random numbers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With