What do you mean by “random with equal probability for each sample”?
I thought if we have dataset like this:x,y,x,x,y,y,x,x,y,x,x,y,x,x,x,x,y,y,y,x,x,y,y,y,x,y
We are sampling it randomly for each batch and in for loop each batch will look like this : x,x,x,y (if batch size is 4) (indexes are randomly chosen)