-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme to provide pointers to the readthedocs. delete obsolete…
… 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
Showing
2 changed files
with
32 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.