scglue.models.glue.GLUETrainer
- class scglue.models.glue.GLUETrainer(net, lam_data=None, lam_kl=None, lam_graph=None, lam_align=None, modality_weight=None, optim=None, lr=None, **kwargs)[source]
Bases:
Trainer
Trainer for
GLUE
- Parameters
net (
scglue.models.glue.GLUE
) –GLUE
network to be trainedlam_data (
typing.Optional
[float
]) – Data weightlam_graph (
typing.Optional
[float
]) – Graph weightlam_align (
typing.Optional
[float
]) – Adversarial alignment weightmodality_weight (
typing.Optional
[typing.Mapping
[str
,float
]]) – Relative modality weight (indexed by modality name)optim (
typing.Optional
[str
]) – Optimizerlr (
typing.Optional
[float
]) – Learning rate**kwargs – Additional keyword arguments are passed to the optimizer constructor
Methods
Compute loss functions
Fit network
Format data tensors
Get loss values for given data
Load state from a state dict
State dict
A single training step
A single validation step
Attributes
logger