Add examples/dynamic_components.py
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import pytorch_lightning as pl
|
||||
import torch
|
||||
from prototorch.functions.competitions import wtac
|
||||
from torch.optim.lr_scheduler import ExponentialLR
|
||||
|
||||
|
||||
|
@@ -120,6 +120,9 @@ class GLVQ(AbstractPrototypeModel):
|
||||
# def predict_step(self, batch, batch_idx, dataloader_idx=None):
|
||||
# pass
|
||||
|
||||
def increase_prototypes(self, initializer, distribution):
|
||||
self.proto_layer.increase_components(initializer, distribution)
|
||||
|
||||
def __repr__(self):
|
||||
super_repr = super().__repr__()
|
||||
return f"{super_repr}"
|
||||
|
Reference in New Issue
Block a user