Skip to content

Commit

Permalink
update readme to provide pointers to the readthedocs. delete obsolete…
Browse files Browse the repository at this point in the history
… contributing.md as updated material is now in the readthedocs
  • Loading branch information
belsten authored and belsten committed Nov 23, 2024
1 parent 1a8c233 commit 07751e1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 91 deletions.
51 changes: 32 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
# Sparse Coding
Reference sparse coding implementations for efficient learning and inference implemented in PyTorch with GPU support.
# RCTN SparseCoding Library

## Dictionary Learning
* Repo currently includes classic patch-wise sparse coding dictionary learning.
`sparsecoding` is a Python library developed by UC Berkeley's [Redwood Center for Theoretical Neuroscience (RCTN)](https://redwood.berkeley.edu). It provides efficient, batched, and GPU-compatible [PyTorch](https://github.com/pytorch/pytorch) implementations for sparse coding related-algorithms, including dictionary learning, inference, and data processing.

## Implemented Inference Methods
* Locally Competative Algorithm (LCA)
* Gradient Descent with Euler's method on Laplace Prior (Vanilla)
* Laplacian Scale Mixture (LSM)
* Iterative Shrinkage-threshold Algorithm (ISTA)
* Generic PyTorch minimization of arbitrary loss function (PyTorchOptimizer)
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’ve tried to 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.

We believe that sharing code within the scientific community is an important part of science and we hope that the research community finds this library useful.

---

## Features

- Check out our [Quickstart Guide](https://sparsecoding.readthedocs.io/en/latest/quickstart.html) for an overview and setup instructions.
- Refer to the [API Reference](https://sparsecoding.readthedocs.io/en/latest/api.html) for detailed usage of the library's features.

---

## Setup

To install the library, follow these steps:

```bash
git clone https://github.com/rctn/sparsecoding.git
cd sparsecoding
pip install -e .
pip install -r requirements.txt
```

For more detailed instructions, see our [Installation Guide](https://sparsecoding.readthedocs.io/en/latest/install.html).

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](https://ipython.readthedocs.io/en/stable/config/extensions/autoreload.html#autoreload).

# Setup
1. Clone the repo.
2. Navigate to the directory containing the repo directory.
3. Run `pip install -e sparsecoding`
4. Navigate into the repo and install the requirements using `pip install -r requirements.txt`
5. Install the natural images dataset from this link: https://rctn.org/bruno/sparsenet/IMAGES.mat
6. Try running the demo notebook: `examples/sparse_coding.ipynb`

Note: If you are using a Jupyter notebook and change a source file, you can either: 1) restart the Jupyter kernel, or 2) follow instructions [here](https://ipython.readthedocs.io/en/stable/config/extensions/autoreload.html#autoreload).

# Contributing
See the [contributing](docs/contributing.md) document!
We welcome contributions! Please see our [contributing](https://sparsecoding.readthedocs.io/en/latest/contributing.html) for details on how to get involved.
72 changes: 0 additions & 72 deletions docs/contributing.md

This file was deleted.

0 comments on commit 07751e1

Please sign in to comment.