GoMNIST
GoMNIST copied to clipboard
Sweeper.Next() doesn't increment sw.i
I think you want:
// Next returns the next image and its label in the data set. // If the end is reached, present is set to false. func (sw *Sweeper) Next() (image RawImage, label Label, present bool) { if sw.i >= len(sw.set.Images) { return nil, 0, false } i, l, p := sw.set.Images[sw.i], sw.set.Labels[sw.i], true sw.i++ return i, l, p }
Otherwise it just keeps returning the first image.
i think so also