-
The original greentfrapp/lucent seems to be abandoned.
-
Unfortunately, it no longer works with default libraries in Colab, in particular, the problem seems to be in the updated versions of torch, kornia.
-
The goal of this fork is to try to fix that, if possible.
-
I might also want to simplify the lib to make it as dumb and easy to understand (and to explain to students)as possible, with the idea that it may be used in education.
-
NOTE THAT THE CODE MIGHT BE BROKEN, DON'T USE IT (YET)!
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.
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.
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")
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.
- 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
- Lessons from a year of Distill ML Research (Shan Carter, OpenVisConf)
- Machine Learning for Visualization (Ian Johnson, OpenVisConf)
Check out #proj-lucid
and #circuits
on the Distill slack!
You may use this software under the Apache 2.0 License. See LICENSE.