Jensun Ravichandran
72af03b991
refactor: use LinearTransform
instead of torch.nn.Linear
2021-06-25 17:07:06 +02:00
Jensun Ravichandran
d42693a441
refactor(api)!: merge the new api changes into dev
2021-06-20 19:00:12 +02:00
danielstaps
0a2da9ae50
Added Vis for GMLVQ with more then 2 dims using PCA ( #11 )
...
* Added Vis for GMLVQ with more then 2 dims using PCA
* Added initialization possibility to GMlVQ with PCA and one example with omega init + PCA vis of 3 dims
* test(githooks): Add githooks for automatic commit checks
Co-authored-by: staps@hs-mittweida.de <staps@hs-mittweida.de>
Co-authored-by: Alexander Engelsberger <alexanderengelsberger@gmail.com>
2021-06-18 13:28:11 +02:00
Alexander Engelsberger
8956ee75ad
test(githooks): Add githooks for automatic commit checks
2021-06-16 16:16:34 +02:00
Jensun Ravichandran
a37095409b
[BUGFIX] examples/cbc_iris.py
works again
2021-06-15 15:59:47 +02:00
Jensun Ravichandran
68034d56f6
[BUGFIX] examples/glvq_iris.py
works again
2021-06-14 20:13:25 +02:00
Jensun Ravichandran
69e5ff3243
Import from the newly cleaned-up prototorch namespace
2021-06-14 20:08:08 +02:00
Jensun Ravichandran
d558fa6a4a
[REFACTOR] Clean up GLVQ-types
2021-06-07 17:00:38 +02:00
Jensun Ravichandran
016fcb4060
[REFACTOR] Major cleanup
2021-06-04 22:20:32 +02:00
Jensun Ravichandran
42d974e08c
No implicit learning rate scheduling
2021-06-04 15:55:06 +02:00
Alexander Engelsberger
47db1965ee
[BUGFIX] GNG Example
2021-06-03 15:42:54 +02:00
Alexander Engelsberger
358f27257d
[REFACTOR] Remove prototype_initializer function from GLVQ
...
Fixes #9
2021-06-03 15:15:22 +02:00
Alexander Engelsberger
e209bf73d5
[BUGFIX] Pruning example works on GPU now
2021-06-03 14:35:24 +02:00
Jensun Ravichandran
8f7deb75dd
[FEATURE] Log prototype win ratios over all training batches
2021-06-02 02:32:54 +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
27eccf44d4
Use LambdaLayer from ProtoTorch
2021-05-31 16:53:04 +02:00
Alexander Engelsberger
2a218c0ede
Add example for dynamic components in callbacks
2021-05-31 11:39:24 +02:00
Alexander Engelsberger
db064b5af1
Improvement of model __repr__
2021-05-31 11:19:06 +02:00
Alexander Engelsberger
0ac4ced85d
[refactor] Use functional variant of accuracy
...
Prevents Accuracy in `__repr__` of the models.
2021-05-31 11:12:27 +02:00
Jensun Ravichandran
cd73f6c427
Add examples/dynamic_components.py
2021-05-31 00:32:27 +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
Jensun Ravichandran
139109804f
[BUGFIX] Use _forward
in LVQ1 and LVQ21
2021-05-25 17:43:37 +02:00
Alexander Engelsberger
8ce18f83ce
Add prototype_initializer function to GLVQ
...
This allows overwriting it inside subclasses.
2021-05-21 17:13:10 +02:00
Alexander Engelsberger
7b4f7d84e0
Update Documentation
...
Clean up project
2021-05-21 15:42:45 +02:00
Jensun Ravichandran
a5e086ce0d
Refactor code
2021-05-21 13:33:57 +02:00
Jensun Ravichandran
88a34a06ef
[WIP] Update CBC implementation to use SiameseGLVQ
2021-05-20 17:36:00 +02:00
Jensun Ravichandran
df061cc2ff
Refactor code
2021-05-20 14:40:02 +02:00
Alexander Engelsberger
969fb34cc3
Accumulate test loss
2021-05-20 14:20:23 +02:00
Alexander Engelsberger
0204f5eab6
Log test accuracy.
2021-05-20 14:03:31 +02:00
Alexander Engelsberger
b7fc5df386
Log test loss.
2021-05-20 13:47:20 +02:00
Alexander Engelsberger
faf1a88f99
[Bugfix] Remove optimzer_idx from validation and test.
2021-05-20 13:17:27 +02:00
Jensun Ravichandran
5ffbd43a7c
Refactor into shared_step
2021-05-19 16:57:51 +02:00
Jensun Ravichandran
fdf9443a2c
Add validation and test logic
2021-05-19 16:30:19 +02:00
Jensun Ravichandran
eefec19c9b
Custom non-gradient training
2021-05-18 19:49:16 +02:00
Jensun Ravichandran
81346785bd
Cleanup models
...
Siamese architectures no longer accept a `backbone_module`. They have to be
initialized with an pre-initialized backbone object instead. This is so that the
visualization callbacks could use the very same object for visualization
purposes. Also, there's no longer a dependent copy of the backbone. It is
managed simply with `requires_grad` instead.
2021-05-17 17:00:23 +02:00
Jensun Ravichandran
b7684ae512
predict_latent
no longer returns numpy
2021-05-15 12:52:16 +02:00
Alexander Engelsberger
0eac2ce326
Examples use GPUs if available.
2021-05-13 15:22:01 +02:00
Jensun Ravichandran
8f9c29bd2b
[BUGFIX] Remove incorrect import statement
2021-05-12 16:45:01 +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
Jensun Ravichandran
eab1ec72c2
Change optimizer using kwargs
2021-05-11 16:13:00 +02:00
Alexander Engelsberger
3fa6378c4d
Add LVQ1 and LVQ2.1 Models.
2021-05-11 13:26:13 +02:00
Jensun Ravichandran
ed03ab168e
[BUGFIX] Fix lambda_matrix property in GMLVQ
2021-05-10 14:09:25 +02:00
Jensun Ravichandran
c6e06ceaa4
Properly initialize prototypes in LVQMLN
2021-05-09 20:55:28 +02:00
Jensun Ravichandran
ca4c9da10a
Add the namespace hook for GMLVQ in the model class
2021-05-09 20:53:31 +02:00
Jensun Ravichandran
d7972a69e8
Update GMLVQ model
2021-05-07 15:24:47 +02:00
Alexander Engelsberger
4bbe73e3a9
Add GRLVQ with examples.
2021-05-06 18:42:06 +02:00
Alexander Engelsberger
5a2f4f6170
Revert deletion of training accuracy.
2021-05-06 18:02:01 +02:00
Alexander Engelsberger
1c3613019b
Update Examples to new initializer architecture.
...
Visualization still borken for some examples.
2021-05-06 14:10:09 +02:00
Jensun Ravichandran
d644114090
Add loss transfer function to glvq
2021-05-04 20:56:16 +02:00