Hi Zzuczy!



 zzuczy:


up-sampling causes a typical batch to contain multiple duplicate DOG samples



Consider a batch of ten samples consisting of five copies of sample
DOG-1 and one copy each of samples Not-DOG-1, Not-DOG-2, …,
Not-DOG-5, with each of the ten samples weighted equally.  This
batch contains (of course) duplicate DOG samples.
Now consider a batch of six samples, DOG-1, Not-DOG-1, Not-DOG-2,
…, Not-DOG-5, with a weight of 5.0 for the DOG-1 sample, and a
weight of 1.0 for each of the Not-DOG samples.  Such a weighting
can be achieved by using pos_weight = 5.0.
Two questions:  What will be the relationship between the two losses
computed for these two batches?  And which batch is likely to be
cheaper to process (both forward and backward)?
Best.
K. Frank