lucent  by greentfrapp

PyTorch adaptation of the Lucid feature visualization library

created 5 years ago
638 stars

Top 52.9% on sourcepulse

GitHubView on GitHub
Project Summary

Lucent is a Python library that adapts the Lucid library for PyTorch, enabling feature visualization for PyTorch models. It is targeted at researchers and practitioners in machine learning and computer vision who want to understand and visualize the internal representations of neural networks. The primary benefit is providing PyTorch users with a familiar and powerful tool for interpretability.

How It Works

Lucent leverages PyTorch's autograd capabilities to perform gradient ascent on specific layers or neurons within a neural network. By optimizing an input image to maximize the activation of a chosen feature, it generates visualizations that reveal what the network has learned. This approach is advantageous as it integrates seamlessly with the PyTorch ecosystem.

Quick Start & Requirements

  • Install via pip: pip install torch-lucent
  • Requires PyTorch and a CUDA-enabled GPU for optimal performance, though CPU is supported.
  • Official Colab notebooks are available for immediate use.

Highlighted Details

  • Adapts the original Lucid library for PyTorch.
  • Provides tools for feature visualization and interpretability.
  • Includes examples recreating Lucid notebooks.

Maintenance & Community

  • Project is hosted on GitHub: greentfrapp/lucent.
  • Community discussion available on Distill Slack channels: #proj-lucid and #circuits.

Licensing & Compatibility

  • Licensed under the Apache 2.0 License.
  • Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

The library is explicitly stated to be in a "pre-alpha phase," indicating potential instability, incomplete features, and ongoing development. The authors note they are solely responsible for any issues or bugs.

Health Check
Last commit

4 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
14 stars in the last 90 days

Explore Similar Projects

Starred by Philipp Schmid Philipp Schmid(DevRel at Google DeepMind), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
5 more.

the-incredible-pytorch by ritchieng

0.2%
12k
Curated list of PyTorch resources
created 8 years ago
updated 1 week ago
Starred by Tim J. Baek Tim J. Baek(Founder of Open WebUI), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
7 more.

pytorch-tutorial by yunjey

0.1%
32k
PyTorch tutorial for deep learning researchers
created 8 years ago
updated 1 year ago
Feedback? Help us improve.