Skip to content

Reference sparse coding implementations for efficient learning and inference.

License

Notifications You must be signed in to change notification settings

rctn/sparsecoding

Repository files navigation

RCTN SparseCoding Library

Documentation status

sparsecoding is a Python library developed by UC Berkeley's Redwood Center for Theoretical Neuroscience (RCTN). It provides efficient, batched, and GPU-compatible PyTorch implementations for sparse coding related-algorithms, including dictionary learning, inference, and data processing.

Historically, sparse coding has been largely focused on learning sparse representations of images, and we provide visualization and transformation tools to work with such data. However, we structure the transformation, dictionary learning methods, and inference methods in a manner that is data-agnostic, making them applicable to a wide range of use cases.

Features

  • Check out our Quickstart Guide for an overview and setup instructions.
  • Refer to the API Reference for detailed usage of the library's features.

Setup

To install the library, follow these steps:

git clone https://github.com/rctn/sparsecoding.git
cd sparsecoding
pip install -e ".[all]"

Try running the demo notebook: examples/sparse_coding.ipynb.

For more detailed instructions, see our Installation Guide.

Note: If you're using a Jupyter notebook and make changes to the source files, you can either:

  • Restart the Jupyter kernel, or
  • Use the autoreload extension as explained here.

Contributing

We welcome contributions! Please see our contributing for details on how to get involved.

About

Reference sparse coding implementations for efficient learning and inference.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published