keras_mixup_generator icon indicating copy to clipboard operation
keras_mixup_generator copied to clipboard

error on last step

Open amapic opened this issue 6 years ago • 0 comments

Hi, Unless I am mistaken, I had problem for every last batch of epochs. It comes from these expressions : X_l = l.reshape(self.batch_size, 1, 1, 1) y_l = l.reshape(self.batch_size, 1) l = np.random.beta(self.alpha, self.alpha, self.batch_size)

Indeed, the size of the last batch may be different from self.batch_size, which causes problems when we perform the mixup. I corrected it by replacing self.batch_size with X1.shape[0] Hope it helps.

amapic avatar Jul 10 '19 12:07 amapic