Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dropout Implementation: Do all images in a batch get the same mask in Caffe?

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?

like image 794
Jayant Agrawal Avatar asked Oct 15 '25 03:10

Jayant Agrawal


1 Answers

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.

like image 149
hbaderts Avatar answered Oct 19 '25 14:10

hbaderts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!