ttslearn.train_util.setup

ttslearn.train_util.setup(config, device, collate_fn)[source]

Setup for traiining

Parameters
  • config (dict) – configuration for training

  • device (torch.device) – device to use for training

  • collate_fn (callable) – function to collate mini-batches

Returns

tuple containing model, optimizer, learning rate scheduler,

data loaders, tensorboard writer, and logger.

Return type

(tuple)

Note

書籍に記載のコードは、この関数を一部簡略化しています。