das.train_transfer

Code for training networks.

das.train_transfer.train(load_name, *, data_dir: str = '../dat.song', save_dir: str = './', verbose: int = 2, nb_epoch: int = 400, fraction_data=None, seed: Optional[int] = None, freeze: bool = False, reshape_output: bool = False, learning_rate: float = 0.0001, reduce_lr: bool = False)[source]

Transfer learning - load existing network and train with new data

Parameters
  • load_name (str) – old model to load.

  • model_name (str) – [description]. Defaults to ‘tcn_seq’.

  • data_dir (str) – [description]. Defaults to ‘../dat.song’.

  • save_dir (str) – [description]. Defaults to current directory (‘./’).

  • verbose (int) – Verbosity of training output (0 - no output(?), 1 - progress bar, 2 - one line per epoch). Defaults to 2.

  • nb_epoch (int) – Defaults to 400.

  • fraction_data (float) – [description]. Defaults to 1.0.

  • seed (int) – Random seed for selecting subsets of the data. Defaults to None (no seed).

  • freeze (bool) – freeze TCN layers of the pre-trained network

  • reshape_output (bool) – reshape output layers of the pre-trained network to match new data

  • learning_rate (float) – lr

  • reduce_lr (bool) – reduce learning rate