[QA] Remove unused argument from CBC
This commit is contained in:
parent
c7b5c88776
commit
43fc7d1678
@ -2,24 +2,15 @@ import torch
|
|||||||
import torchmetrics
|
import torchmetrics
|
||||||
|
|
||||||
from .abstract import ImagePrototypesMixin
|
from .abstract import ImagePrototypesMixin
|
||||||
from .extras import (
|
from .extras import (CosineSimilarity, MarginLoss, ReasoningLayer,
|
||||||
CosineSimilarity,
|
euclidean_similarity, rescaled_cosine_similarity,
|
||||||
MarginLoss,
|
shift_activation)
|
||||||
ReasoningLayer,
|
|
||||||
euclidean_similarity,
|
|
||||||
rescaled_cosine_similarity,
|
|
||||||
shift_activation,
|
|
||||||
)
|
|
||||||
from .glvq import SiameseGLVQ
|
from .glvq import SiameseGLVQ
|
||||||
|
|
||||||
|
|
||||||
class CBC(SiameseGLVQ):
|
class CBC(SiameseGLVQ):
|
||||||
"""Classification-By-Components."""
|
"""Classification-By-Components."""
|
||||||
def __init__(self,
|
def __init__(self, hparams, margin=0.1, **kwargs):
|
||||||
hparams,
|
|
||||||
margin=0.1,
|
|
||||||
similarity=euclidean_similarity,
|
|
||||||
**kwargs):
|
|
||||||
super().__init__(hparams, **kwargs)
|
super().__init__(hparams, **kwargs)
|
||||||
self.margin = margin
|
self.margin = margin
|
||||||
self.similarity_fn = kwargs.get("similarity_fn", euclidean_similarity)
|
self.similarity_fn = kwargs.get("similarity_fn", euclidean_similarity)
|
||||||
|
Loading…
Reference in New Issue
Block a user