Skip to content

Latest commit

 

History

History

website

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Captum Logo

Conda PyPI CircleCI Codecov

Captum is a model interpretability and understanding library for PyTorch. Captum means comprehension in latin and contains general purpose implementations of integrated gradients, saliency maps, smoothgrad, vargrad and others for PyTorch models. It has quick integration for models built with domain-specific libraries such as torchvision, torchtext, and others.

Captum is currently in beta and under active development!

Why Captum?

TODO: Add content here

Target Audience

TODO: Add content here

Installation

Installation Requirements

  • Python >= 3.6
  • PyTorch >= 1.2
Installing the latest release

The latest release of Captum is easily installed either via Anaconda (recommended):

conda install captum -c pytorch

or via pip:

pip install captum
Installing from latest master

If you'd like to try our bleeding edge features (and don't mind potentially running into the occasional bug here or there), you can install the latest master directly from GitHub:

pip install git+https://github.com/pytorch/captum.git

Manual / Dev install

Alternatively, you can do a manual install. For a basic install, run:

git clone https://github.com/pytorch/captum.git
cd captum
pip install -e .

To customize the installation, you can also run the following variants of the above:

  • pip install -e .[dev]: Also installs all tools necessary for development (testing, linting, docs building; see Contributing below).
  • pip install -e .[tutorials]: Also installs all packages necessary for running the tutorial notebooks.

To execute unit tests from a manual install, run:

# running a single unit test
python -m unittest -v tests.attributions.test_saliency
# running all unit tests
pytest -ra

Getting Started

TODO: Add content here

Contributing

See the CONTRIBUTING file for how to help out.

References

License

Captum is BSD licensed, as found in the LICENSE file.