Code Monkey home page Code Monkey logo

lucid's Introduction

Lucid

PyPI project status Travis build status Code coverage Supported Python version PyPI release version

Lucid is a collection of infrastructure and tools for research in neural network interpretability.

This repository is a fork of the original tensorflow repository, that has been modified to support tensorflow 2 since Colab does no longer support the %tensorflow_version 1.x compatibility magic command.

Lucid is research code, not production code. We provide no guarantee it will work for your use case. Lucid is maintained by volunteers who are unable to provide significant technical support.

Notebooks

Start visualizing neural networks with no setup. The following notebooks run right from your browser, thanks to Colaboratory. It's a Jupyter notebook environment that requires no setup to use and runs entirely in the cloud.

You can run the notebooks on your local machine, too. Clone the repository and find them in the notebooks subfolder. You will need to run a local instance of the Jupyter notebook environment to execute them.

Tutorial Notebooks

  • Tutorial notebook

    This tutorial quickly introduces Lucid, a network for visualizing neural networks. Lucid is a kind of spiritual successor to DeepDream, but provides flexible abstractions so that it can be used for a wide range of interpretability research.

  • Modelzoo notebook

    If you want to study techniques for visualizing and understanding neural networks, it's important to be able to try your experiments on multiple models.
    Lucid is a library for visualizing neural networks. As of lucid v0.3, we provide a consistent API for interacting with 27 different vision models.

Feature Visualization Notebooks

Notebooks corresponding to the Feature Visualization article

  • Negative Neurons

    This notebook reproduces the negative channel visualizations shown in the article.

  • Neuron diversity

    This notebook reproduces the neuron diversity visualizations shown in the article.

  • Neuron interaction

    This notebook reproduces some visualizations created by interacting different neurons as described in the article.

  • Regularization

    This notebook describes the feature visualization algorithms used in the article.

Building Blocks Notebooks

Notebooks corresponding to the Building Blocks of Interpretability article

  • Semantic Dictionary

    This notebook studies semantic dictionaries. The basic idea of semantic dictionaries is to marry neuron activations to visualizations of those neurons, transforming them from abstract vectors to something more meaningful to humans. Semantic dictionaries can also be applied to other bases, such as rotated versions of activations space that try to disentangle neurons.

  • Activation Grid

    This notebook studies activation grids a technique for visualizing how a network "understood" an image at a particular layer.

  • Spacial Attribution

    This notebook demonstrates Spatial Attribution, a technique for exploring how detectors a different spatial positions in the network effected its output.

  • Channel Attribution

    This notebook demonstrates Channel Attribution, a technique for exploring how different detectors in the network effected its output.

  • Neuron Groups

    This notebook demonstrates Neuron Groups, a technique for exploring how detectors a different spatial positions in the network effected its output. ...

Differentiable Image Parameterizations Notebooks

Notebooks corresponding to the Differentiable Image Parameterizations article

  • Aligned interpolation

    This notebook uses the Lucid library to create a visualizations that interpolates between two feature visualizations.

  • 2D Style transfer

    This notebook uses Lucid to perform style transfer between two images, and show how different parameterizations affect that process.

Activation Atlas Notebooks

Notebooks corresponding to the Activation Atlas article

Collecting activations Simple activation atlas Class activation atlas Activation atlas patches

Miscellaneous Notebooks

Recommended Reading

Related Talks

Community

We're in #proj-lucid on the Distill slack (join link).

We'd love to see more people doing research in this space!


Additional Information

License and Disclaimer

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

This project is research code. It is not an official Google product.

Special consideration for TensorFlow dependency

Lucid requires tensorflow, but does not explicitly depend on it in setup.py. Due to the way tensorflow is packaged and some deficiencies in how pip handles dependencies, specifying either the GPU or the non-GPU version of tensorflow will conflict with the version of tensorflow your already may have installed.

If you don't want to add your own dependency on tensorflow, you can specify which tensorflow version you want lucid to install by selecting from extras_require like so: lucid[tf] or lucid[tf_gpu].

In actual practice, we recommend you use your already installed version of tensorflow.

lucid's People

Contributors

colah avatar ludwigschubert avatar znah avatar ercaronte avatar michaelpetrov avatar badryoubiidrissi avatar jacobhilton avatar abhinavsp0730 avatar gabgoh avatar dependabot[bot] avatar arvind avatar shancarter avatar progamergov avatar ttumiel avatar zanarmstrong avatar bmiselis avatar teonbrooks avatar holt59 avatar mihaimaruseac avatar csvoss avatar 1wheel avatar dguliani avatar tylersuard avatar stefsietz avatar rcshubhadeep avatar samuelmarks avatar merajat avatar nikitricky2 avatar ncammarata avatar marlonjan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.