emonet.train module#

Training module.

To run via CLI:

python train.py <num_workers> <max_epochs> <emotion>

Examples

python train.py 12 300 anger

emonet.train.main(workers: int = 1, epochs: int = 1, emotion: str = 'sadness', use_wandb: bool = False, data_dir: pathlib.Path = PosixPath('/Users/christophersantiago/emonet-data'))[source]#

Train model.

Parameters
  • workers (int) – Number of workers to use.

  • epochs (int) – Number of epochs to train.

  • emotion (str) – Emotion to train model on.

  • use_wandb (bool) – Whether to log results using Weights & Biases

  • data_dir (pathlib.Path) – Path to directory containing training/validation data and manifests.

Returns

Tuple – Model and trainer objects.