idmm
IDMM(model, prediction_mlp, criterion, multiview_loss=True, mixup_fn=None, classifier=None, optimizer=None, lr_scheduler=None, lr_scheduler_interval='epoch')
¶
Bases: SSLModule
IDMM model.
Parameters:
-
model
(
Module
) –backbone model
-
prediction_mlp
(
Module
) –student prediction MLP
-
criterion
(
Module
) –loss function
-
multiview_loss
(
bool
, default:True
) –whether to use the multiview loss as definied in https://arxiv.org/abs/2201.10728. Defaults to True.
-
mixup_fn
(
Mixup | None
, default:None
) –the mixup/cutmix function to be applied to a batch of images. Defaults to None.
-
classifier
(
ClassifierMixin | None
, default:None
) –Standard sklearn classifier
-
optimizer
(
Optimizer | None
, default:None
) –optimizer of the training. If None a default Adam is used.
-
lr_scheduler
(
object | None
, default:None
) –lr scheduler. If None a default ReduceLROnPlateau is used.
-
lr_scheduler_interval
(
str | None
, default:'epoch'
) –interval at which the lr scheduler is updated.
Source code in quadra/modules/ssl/idmm.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|