NameError Traceback (most recent call last)
<ipython-input-42-796ee2023baf> in <module>
----> 1 interp = SegmentationInterpretation.from_learner(learn)
2 interp.plot_top_losses(k=3)
NameError: name 'SegmentationInterpretation' is not defined
From the source code it looks like it’s not implemented, but since it is used on the tutorial I wonder if it was moved somewhere else or if I’m missing something?
Just added from fastai.interpret import SegmentationInterpretation but I get the following:
ImportError Traceback (most recent call last) <ipython-input-15-ea30657bf32e> in <module> ----> 1 from fastai.interpret import SegmentationInterpretation
ImportError: cannot import name 'SegmentationInterpretation' from 'fastai.interpret' (/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/interpret.py)
Name: fastai
Version: 2.1.5
Summary: fastai simplifies training fast and accurate neural nets using modern best practices
Home-page: https://github.com/fastai/fastai/tree/master/
Author: Jeremy Howard, Sylvain Gugger, and contributors
Author-email: info@fast.ai
License: Apache Software License 2.0
Location: /opt/conda/envs/fastai/lib/python3.8/site-packages
Requires: pip, requests, pyyaml, packaging, scipy, torch, fastcore, pandas, pillow, spacy, fastprogress, matplotlib, torchvision, scikit-learn
Required-by: fastbook
Note: you may need to restart the kernel to use updated packages.
SegmentationInterpretation wasn’t added until 2.2+ IIRC (also if you’re reading the docs and they don’t work, upgrading your version is always the answer 99% of the time as that’s what they’re run with)
Hi, I am running into a similar problem as Interpret seems to be wrong and I cannot use the proposed solution
I’m running Fastai 2.4 on a paperspace Jupyter Notebook. I’m following the tutorial for Fastai.vision as amaka_ik was doing.
Interpret, included in 2.4 should include ‘SegmentationInterpretation’ but help(interpret) only shows the Classes ‘ClassificationInterpretation’ and ‘Interpretation’. I am not sure how to get to the right interpret module as it is included in the fastai package. (I tried upgrading fastai with pip)