Name Error: name 'negate_func' is not defined

I tried to clean my data by calling the cleaner.change() method but on running it, I get the error above.

I checked out a snippet of the source code but I can’t seem to find the negate_func function, I went ahead to import the library again but no good. Is anyone else experiencing this?


I was having this issue too.

I had a look at the method on the fastai GitHub repo and the ‘change’ method in the ImagesCleaner Class was changed slightly in the latest update to fastai. Version 2.1.8.

What fixed the issue for me was updating the fastai package through PIP using:

pip install fastai --upgrade

Hope this helps.


Upgrading the library does make sense. Thank you