diff --git a/beginner_source/introyt/captumyt.py b/beginner_source/introyt/captumyt.py index 2ff8e9e70b1..cf63b6109b6 100644 --- a/beginner_source/introyt/captumyt.py +++ b/beginner_source/introyt/captumyt.py @@ -98,21 +98,24 @@ Before you get started, you need to have a Python environment with: - Python version 3.6 or higher -- For the Captum Insights example, Flask 1.1 or higher +- For the Captum Insights example, Flask 1.1 or higher and Flask-Compress + (the latest version is recommended) - PyTorch version 1.2 or higher (the latest version is recommended) - TorchVision version 0.6 or higher (the latest version is recommended) - Captum (the latest version is recommended) +- Matplotlib version 3.3.4, since Captum currently uses a Matplotlib + function whose arguments have been renamed in later versions To install Captum in an Anaconda or pip virtual environment, use the appropriate command for your environment below: With ``conda``:: - conda install pytorch torchvision captum -c pytorch + conda install pytorch torchvision captum flask-compress matplotlib=3.3.4 -c pytorch With ``pip``:: - pip install torch torchvision captum + pip install torch torchvision captum matplotlib==3.3.4 Flask-Compress Restart this notebook in the environment you set up, and you’re ready to go! @@ -155,7 +158,7 @@ # now. # -model = models.resnet101(weights='IMAGENET1K_V1') +model = models.resnet18(weights='IMAGENET1K_V1') model = model.eval()