ef6bcc1079
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 ```
27 lines
609 B
Python
27 lines
609 B
Python
"""`models` plugin for the `prototorch` package."""
|
|
|
|
from importlib.metadata import PackageNotFoundError, version
|
|
|
|
from .callbacks import (EarlyStopWithoutVal, PrototypeConvergence,
|
|
PruneLoserPrototypes)
|
|
from .cbc import CBC, ImageCBC
|
|
from .glvq import (
|
|
GLVQ,
|
|
GLVQ1,
|
|
GLVQ21,
|
|
GMLVQ,
|
|
GRLVQ,
|
|
LGMLVQ,
|
|
LVQMLN,
|
|
ImageGLVQ,
|
|
ImageGMLVQ,
|
|
SiameseGLVQ,
|
|
SiameseGMLVQ,
|
|
)
|
|
from .lvq import LVQ1, LVQ21, MedianLVQ
|
|
from .probabilistic import CELVQ, RSLVQ, LikelihoodRatioLVQ
|
|
from .unsupervised import KNN, NeuralGas
|
|
from .vis import *
|
|
|
|
__version__ = "0.1.7"
|