simsiam
SimSIAM(model, projection_mlp, prediction_mlp, criterion, classifier=None, optimizer=None, lr_scheduler=None, lr_scheduler_interval='epoch')
¶
Bases: SSLModule
SimSIAM model.
Parameters:
-
model
(
Module
) –Feature extractor as pytorch
torch.nn.Module
-
projection_mlp
(
Module
) –optional projection head as pytorch
torch.nn.Module
-
prediction_mlp
(
Module
) –optional predicition head as pytorch
torch.nn.Module
-
criterion
(
Module
) –loss to be applied.
-
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/simsiam.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|