scglue.models.scglue.SCGLUETrainer.compute_losses
- SCGLUETrainer.compute_losses(data, epoch, dsc_only=False)[source]
Compute loss functions
- Parameters:
data (
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]) – Data tensorsepoch (
int) – Current epoch numberdsc_only (
bool) – Whether to compute the discriminator loss only
- Return type:
- Returns:
loss_dict – Dict containing loss values