clinicadl.train.TrainerState¶
- class clinicadl.train.TrainerState(**data: Any) None[source]¶
Represents the state of a
Trainer.- Attributes:
called (Optional[TrainerCall]) – The method of the
Trainerthat has been called. One of"train","validate"or"test".Noneif no method has been called so far.stage (Optional[TrainerStage]) – Current action performed by the
Trainer. One of"training"or"evaluation".should_stop (bool) – Whether the training should be stopped at the end of the current epoch during
Trainer.train.current_train_batch (int) – Index of the current training batch in
Trainer.train.num_train_batches (int) – Total number of training batches in
Trainer.train.current_val_batch (int) – Index of the current validation batch in
Trainer.validateorTrainer.train.num_val_batches (int) – Total number of validation batches in
Trainer.validateorTrainer.train.current_test_batch (int) – Index of the current test batch
Trainer.test.num_test_batches (int) – Total number of test batches in
Trainer.test.current_epoch (int) – Index of the current epoch in
Trainer.train.num_epochs (int) – Total number of epochs in
Trainer.train.optim_step (int) – The total number of optimization steps performed so far in
Trainer.train.split_idx (Optional[int]) – Index of the split on which training/validation is currently performed in
Trainer.trainorTrainer.validate.