Skip to main content

Lucid for PyTorch. Collection of infrastructure and tools for research in neural network interpretability.

Project description

Lucent

Travis build status Code coverage

PyTorch + Lucid = Lucent

The wonderful Lucid library adapted for the wonderful PyTorch!

Lucent is not affiliated with Lucid or OpenAI's Clarity team, although we would love to be! Credit is due to the original Lucid authors, we merely adapted the code for PyTorch and we take the blame for all issues and bugs found here.

Usage

Lucent is still in pre-alpha phase and can be installed locally with the following command:

pip install torch-lucent

In the spirit of Lucid, get up and running with Lucent immediately, thanks to Google's Colab!

You can also clone this repository and run the notebooks locally with Jupyter.

Quickstart

import torch

from lucent.optvis import render
from lucent.modelzoo import inceptionv1

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = inceptionv1(pretrained=True)
model.to(device).eval()

render.render_vis(model, "mixed4a:476")

Tutorials

Other Notebooks

Here, we have tried to recreate some of the Lucid notebooks! You can also check out the lucent-notebooks repo to clone all the notebooks.

Recommended Readings

Related Talks

Slack

Check out #proj-lucid and #circuits on the Distill slack!

Additional Information

License and Disclaimer

You may use this software under the Apache 2.0 License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch-lucent-0.1.8.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

torch_lucent-0.1.8-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file torch-lucent-0.1.8.tar.gz.

File metadata

  • Download URL: torch-lucent-0.1.8.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for torch-lucent-0.1.8.tar.gz
Algorithm Hash digest
SHA256 d658af8f950bc3e582d7c10a9983ee83d32c04c3049ad84707d823550950a71e
MD5 988a9cb25abcabfe98b19c7fdf62695c
BLAKE2b-256 cd2b981db9254c6aa5c86718240e76154e985b9d7a763f16e96a5e6e277aa778

See more details on using hashes here.

File details

Details for the file torch_lucent-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: torch_lucent-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 46.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for torch_lucent-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ccd184a0447946dd55ba925046e39d43ad05e8067cf447730cf3bf6256ab4696
MD5 023d894457025d4bb400ce90a374d10c
BLAKE2b-256 9f8da1edbdf9ba0a2a84e832b36a7b4a1b22ce073649969a9ec2cbfc003f0ff0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page