core.MEDIAR.Trainer — spacr 0.5.0 documentation

# core.MEDIAR.Trainer

## Module Contents

class core.MEDIAR.Trainer.Trainer(model, dataloaders, optimizer, scheduler=None, criterion=None, num_epochs=100, device='cuda:0', no_valid=False, valid_frequency=1, amp=False, algo_params=None)

  Bases: `core.BaseTrainer.BaseTrainer`

  Abstract base class for trainer implementations

  mse_loss
  bce_loss
  mediar_criterion(outputs, labels_onehot_flows)

    loss function between true labels and prediction outputs