Unable to use ImageCleaner widget

Hello all,

I have been trying to use the Imagecleaner widget in AWS Sagemaker but it fails to load for me.
Current fastai version - ‘2.3.1’.

from fastai.vision.widgets import *
ds, idxs = DatasetFormatter().from_toplosses(learn, n_imgs=100)

NameError: name ‘DatasetFormatter’ is not defined

Can someone help how to resolve the above error?
I have used it in the previous fastai version(1.0.61) it worked perfectly!
Is it different for the newer version?

Thanks for any help!

top losses method are now part of Interpretation module. DatasetFormatter is not available in v2. See this example on how to use top losses from Intepretation

1 Like

Thanks @msivanes it helped :slight_smile: