Commit Graph

26 Commits

Author SHA1 Message Date
Alexander Engelsberger
3b02d99ebe [BUGFIX] Early stopping example works now 2021-06-03 13:38:16 +02:00
Jensun Ravichandran
ef6bcc1079 [BUG] Early stopping does not seem to work
The early stopping callback does not work as expected, and crashes at the end of
max_epochs with:

```
~/miniconda3/envs/py38/lib/python3.8/site-packages/pytorch_lightning/trainer/callback_hook.py in on_train_end(self)
    155         """Called when the train ends."""
    156         for callback in self.callbacks:
--> 157             callback.on_train_end(self, self.lightning_module)
    158
    159     def on_pretrain_routine_start(self) -> None:

~/work/repos/prototorch_models/prototorch/models/callbacks.py in on_train_end(self, trainer, pl_module)
     18     def on_train_end(self, trainer, pl_module):
     19         # instead, do it at the end of training loop
---> 20         self._run_early_stopping_check(trainer, pl_module)
     21
     22

TypeError: _run_early_stopping_check() takes 2 positional arguments but 3 were given
```
2021-06-02 12:44:34 +02:00
Jensun Ravichandran
8851d1bbc9 [FEATURE] Add PruneLoserPrototypes Callback 2021-06-02 03:52:41 +02:00
Jensun Ravichandran
757f4e980d Add Local-Matrix LVQ
Also remove the use of `self.distance_fn` in favor of `self.distance_layer`.
2021-06-01 23:44:16 +02:00
Jensun Ravichandran
1636c84778 Rename rslvq example 2021-05-31 17:56:45 +02:00
Jensun Ravichandran
b7edee02c3 [WIP] Add CELVQ
TODO Ensure that the distances/probs corresponding to the plabels are sorted
like the target labels.
2021-05-27 17:40:16 +02:00
Jensun Ravichandran
d411e52be4 Refactor non-gradient-lvq models into lvq.py 2021-05-25 20:37:34 +02:00
Alexander Engelsberger
32d6f95db0 Add RSLVQ and LikelihoodLVQ 2021-05-25 20:26:15 +02:00
Alexander Engelsberger
7b4f7d84e0 Update Documentation
Clean up project
2021-05-21 15:42:45 +02:00
Jensun Ravichandran
0611f81aba Update models namespace 2021-05-21 13:11:59 +02:00
Jensun Ravichandran
eefec19c9b Custom non-gradient training 2021-05-18 19:49:16 +02:00
Jensun Ravichandran
ca39aa00d5 Stop passing component initializers as hparams
Pass the component initializer as an hparam slows down the script very much. The
API has now been changed to pass it as a kwarg to the models instead.

The example scripts have also been updated to reflect the new changes.

Also, ImageGMLVQ and an example script `gmlvq_mnist.py` that uses it have also
been added.
2021-05-12 16:36:22 +02:00
Alexander Engelsberger
1498c4bde5 Bump version: 0.1.6 → 0.1.7 2021-05-11 17:18:29 +02:00
Jensun Ravichandran
59b8ab6643 Add knn 2021-05-11 17:22:02 +02:00
Alexander Engelsberger
e87563e10d Bump version: 0.1.5 → 0.1.6 2021-05-11 13:41:26 +02:00
Alexander Engelsberger
3fa6378c4d Add LVQ1 and LVQ2.1 Models. 2021-05-11 13:26:13 +02:00
Alexander Engelsberger
30ee287ecc Bump version: 0.1.4 → 0.1.5 2021-05-10 17:13:00 +02:00
Alexander Engelsberger
f49db0bf2c Bump version: 0.1.3 → 0.1.4 2021-05-10 17:06:28 +02:00
Alexander Engelsberger
54a8494d86 Bump version: 0.1.2 → 0.1.3 2021-05-10 17:04:20 +02:00
Alexander Engelsberger
bf310be97c Bump version: 0.1.1 → 0.1.2 2021-05-10 16:47:33 +02:00
Alexander Engelsberger
1ae2b41edd Bump version: 0.1.0 → 0.1.1 2021-05-10 16:26:21 +02:00
Alexander Engelsberger
f6e3a37e2b Bump version: 0.0.0 → 0.1.0 2021-05-10 16:01:46 +02:00
Alexander Engelsberger
6873927349 Setup bumpversion 2021-05-10 15:34:43 +02:00
Jensun Ravichandran
17315ff242 Add models to the prototorch.models namespace 2021-05-07 15:23:52 +02:00
Alexander Engelsberger
c4c51a16fe Automatic Formating. 2021-04-23 17:27:47 +02:00
Jensun Ravichandran
f4e703abee Use models namespace 2021-04-21 13:30:50 +02:00