Skip to content

Non-negative similarity matching in PyTorch

The pynsm package provides PyTorch implementations of neural networks that are based on similarity matching. These networks were introduced in the biologically plausible neural network literature. They typically contain lateral connections, requiring the forward pass to solve a fixed-point problem.

Installing the package

Run the following command in the Python virtual environment of your choice:

pip install pynsm

For more details, see installation.

Getting started

To get started, check out the basic usage page. The examples show more complex usage patterns.

How tos

Check out the how-to guides in the navigation bar for instructions on how to use or extend the code.

What is non-negative similarity matching?

If you are unsure what non-negative similarity matching is or why you should care, check out the Background pages in the navigation bar.

API reference

For details about the classes and functions in the package, check out the API reference in the navigation bar.