ncem.estimators.EstimatorLinear.pretrain_decoder

EstimatorLinear.pretrain_decoder(decoder_epochs: int = 1000, patience: int = 20, lr_schedule_min_lr: float = 1e-05, lr_schedule_factor: float = 0.2, lr_schedule_patience: int = 5, initial_epoch: int = 0, monitor_partition: str = 'val', monitor_metric: str = 'loss', log_dir: Optional[str] = None, callbacks: Optional[list] = None, early_stopping: bool = True, reduce_lr_plateau: bool = True, **kwargs)

Pre-train decoder model.

Use validation loss and maximum number of epochs as termination criteria.

Parameters
  • patience (int) – Number of epochs with no improvement. If unspecified, it will default to 20.

  • lr_schedule_min_lr (float) – Lower bound on the learning rate. If unspecified, it will default to 1e-5.

  • lr_schedule_factor (float) – Factor by which the learning rate will be reduced. new_lr = lr * factor. If unspecified, it will default to 0.2.

  • lr_schedule_patience (int) – Number of epochs with no improvement after which learning rate will be reduced. If unspecified, it will default to 5.

  • initial_epoch (int) – Epoch at which to start training (useful for resuming a previous training run). If unspecified, it will default to 0.

  • monitor_partition (str) – Monitor partition.

  • monitor_metric (str) – Monitor metric.

  • log_dir (str, optional) – Logging directory.

  • callbacks (list, optional) – List of callbacks to be called during training.

  • early_stopping (bool) – Whether to activate early stopping.

  • reduce_lr_plateau (bool) – Whether to reduce learning rate on plateau.

  • decoder_epochs (int) – Integer number of times to iterate over the training data arrays in decoder pretraining. If unspecified, it will default to 1000.

  • kwargs – Arbitrary keyword arguments.