Hello Ishal!



 Ishal_Garg:

I have given a weight of 0.35 to the 0th class and 0.65 to the other.
Does it means that the DATALOADER will select 65% of 1st class and 35% of 0th class in a single batch of training data?


No, not exactly.  To take an extreme example, let’s say that your
dataset consists of 100 samples, all from your 1st class.  Then
each batch you generate will only contain samples from your
1st class.
Instead let’s say your dataset consists of 65 samples from your 0th
class and 35 samples from your 1st class.  Now each batch you
generate will be on average equally weighted between the two
classes, but any given batch will have random fluctuations away
from being exactly equally weighted.
Best.
K. Frank