my fork of prototorch
Go to file
Jensun Ravichandran 8a291f7bfb Overload distribution argument in component initializers
The component initializers behave differently based on the type of the
`distribution` argument. If it is a Python
[list](https://docs.python.org/3/tutorial/datastructures.html), it is assumed
that there are as many entries in this list as there are classes, and the number
at each location of this list describes the number of prototypes to be used for
that particular class. So, `[1, 1, 1]` implies that we have three classes with
one prototype per class. If it is a Python
[tuple](https://docs.python.org/3/tutorial/datastructures.html), it a shorthand
of `(num_classes, prototypes_per_class)` is assumed. If it is a Python
[dictionary](https://docs.python.org/3/tutorial/datastructures.html), the
key-value pairs describe the class label and the number of prototypes for that
class respectively. So, `{0: 2, 1: 2, 2: 2}` implies that we have three classes
with labels `{1, 2, 3}`, each equipped with two prototypes.
2021-05-25 20:05:29 +02:00
.github Update bug report issues template. 2021-05-11 13:35:38 +02:00
docs [DOC] Small improvements 2021-05-21 15:59:44 +02:00
examples Use 'num_' in all variable names 2021-05-25 15:57:05 +02:00
prototorch Overload distribution argument in component initializers 2021-05-25 20:05:29 +02:00
tests Use 'num_' in all variable names 2021-05-25 15:57:05 +02:00
.bumpversion.cfg Bump version: 0.4.3 → 0.4.4 2021-05-11 17:17:49 +02:00
.codacy.yml Fix things codacy complains about 2020-09-24 11:53:35 +02:00
.codecov.yml Add .codecov.yml and codecov badge to README.md 2020-04-06 18:07:15 +02:00
.gitignore Ignore artiifacts folder 2021-05-25 16:40:34 +02:00
.readthedocs.yml Add docs 2021-04-14 19:20:08 +02:00
.travis.yml Cache pip in CI 2021-05-25 16:43:48 +02:00
LICENSE Initial commit 2020-02-07 10:11:36 +01:00
MANIFEST.in Update manifest 2020-07-13 09:32:38 +02:00
README.md Update readme 2021-04-29 14:31:36 +02:00
RELEASE.md Add docs 2021-04-14 19:20:08 +02:00
setup.py Update dependencies 2021-05-20 11:44:53 +02:00

ProtoTorch: Prototype Learning in PyTorch

ProtoTorch Logo

Build Status tests GitHub tag (latest by date) PyPI codecov Codacy Badge PyPI - Downloads GitHub license

Tensorflow users, see: ProtoFlow

Description

This is a Python toolbox brewed at the Mittweida University of Applied Sciences in Germany for bleeding-edge research in Prototype-based Machine Learning methods and other interpretable models. The focus of ProtoTorch is ease-of-use, extensibility and speed.

Installation

ProtoTorch can be installed using pip.

pip install -U prototorch

To also install the extras, use

pip install -U prototorch[all]

Note: If you're using ZSH (which is also the default shell on MacOS now), the square brackets [ ] have to be escaped like so: \[\], making the install command pip install -U prototorch\[all\].

To install the bleeding-edge features and improvements:

git clone https://github.com/si-cim/prototorch.git
cd prototorch
git checkout dev
pip install -e .[all]

Documentation

The documentation is available at https://www.prototorch.ml/en/latest/. Should that link not work try https://prototorch.readthedocs.io/en/latest/.

Bibtex

If you would like to cite the package, please use this:

@misc{Ravichandran2020b,
  author = {Ravichandran, J},
  title = {ProtoTorch},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/si-cim/prototorch}}
}