keras_mixup_generator
keras_mixup_generator copied to clipboard
error on last step
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.