scglue.models.scglue.SCGLUETrainer

class scglue.models.scglue.SCGLUETrainer(net, lam_data=None, lam_kl=None, lam_graph=None, lam_align=None, lam_sup=None, normalize_u=None, modality_weight=None, optim=None, lr=None, **kwargs)[source]

Bases: GLUETrainer

Trainer for SCGLUE

Parameters:

Methods

compute_losses

Compute loss functions

format_data

Format data tensors :rtype: typing.Tuple[typing.Mapping[str, torch.Tensor], typing.Mapping[str, torch.Tensor], typing.Mapping[str, torch.Tensor], typing.Mapping[str, torch.Tensor], typing.Mapping[str, torch.Tensor], typing.Mapping[str, torch.Tensor], torch.Tensor, torch.Tensor, torch.Tensor]

train_step

A single training step

Attributes

BURNIN_NOISE_EXAG

freeze_u

Whether to freeze cell embeddings

logger