Lucid for PyTorch. Collection of infrastructure and tools for research in neural network interpretability.
Project description
Lucent
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
- Feature Visualization
- The Building Blocks of Interpretability
- Using Artificial Intelligence to Augment Human Intelligence
- Visualizing Representations: Deep Learning and Human Beings
- Differentiable Image Parameterizations
- Activation Atlas
Related Talks
- Lessons from a year of Distill ML Research (Shan Carter, OpenVisConf)
- Machine Learning for Visualization (Ian Johnson, OpenVisConf)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d658af8f950bc3e582d7c10a9983ee83d32c04c3049ad84707d823550950a71e |
|
MD5 | 988a9cb25abcabfe98b19c7fdf62695c |
|
BLAKE2b-256 | cd2b981db9254c6aa5c86718240e76154e985b9d7a763f16e96a5e6e277aa778 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccd184a0447946dd55ba925046e39d43ad05e8067cf447730cf3bf6256ab4696 |
|
MD5 | 023d894457025d4bb400ce90a374d10c |
|
BLAKE2b-256 | 9f8da1edbdf9ba0a2a84e832b36a7b4a1b22ce073649969a9ec2cbfc003f0ff0 |