datasetFormatter.from_toplosses returning all images instead of images of top_losses

(skye rigdon) #1

I am using the image cleaner widget to look at the photos that are being mislabeled. When I try to use datasetFormatter().from_toplosses() it returns all the images in my valid and train set instead of only the ones from toplosses.

db = (ImageList.from_folder(path)
                   .transform(get_transforms(), size=224)

data_bunch = ImageList.from_folder(path)
learn_cln = cnn_learner(db, models.resnet34, metrics=error_rate)


ds, idxs = DatasetFormatter().from_toplosses(learn_cln)
>>> 548 # the len(ds) is the totoal number of images in my train and validation
 sets. shouldn't it be less?