vak.config.learncurve.LearncurveConfig#

class vak.config.learncurve.LearncurveConfig(model, num_epochs, batch_size, root_results_dir, dataset_path=None, results_dirname=None, normalize_spectrograms=False, num_workers=2, device='cpu', shuffle=True, val_step=None, ckpt_step=None, patience=None, checkpoint_path=None, spect_scaler_path=None, train_transform_params=None, train_dataset_params=None, val_transform_params=None, val_dataset_params=None, post_tfm_kwargs: dict | None = None)[source]#

Bases: TrainConfig

class that represents [LEARNCURVE] section of config.toml file

model#

Model name, e.g., model = "TweetyNet"

Type:

str

dataset_path#

Path to dataset, e.g., a csv file generated by running vak prep.

Type:

str

num_epochs#

number of training epochs. One epoch = one iteration through the entire training set.

Type:

int

normalize_spectrograms#

if True, use spect.utils.data.SpectScaler to normalize the spectrograms. Normalization is done by subtracting off the mean for each frequency bin of the training set and then dividing by the std for that frequency bin. This same normalization is then applied to validation + test data.

Type:

bool

ckpt_step#

step/epoch at which to save to checkpoint file. Default is None, in which case checkpoint is only saved at the last epoch.

Type:

int

patience#

number of epochs to wait without the error dropping before stopping the training. Default is None, in which case training continues for num_epochs

Type:

int

save_only_single_checkpoint_file#

if True, save only one checkpoint file instead of separate files every time we save. Default is True.

Type:

bool

use_train_subsets_from_previous_run#

if True, use training subsets saved in a previous run. Default is False. Requires setting previous_run_path option in config.toml file.

Type:

bool

post_tfm_kwargs#

Keyword arguments to post-processing transform. If None, then no additional clean-up is applied when transforming labeled timebins to segments, the default behavior. The transform used is vak.transforms.frame_labels.ToSegmentsWithPostProcessing`. Valid keyword argument names are 'majority_vote' and 'min_segment_dur', and should be appropriate values for those arguments: Boolean for ``majority_vote, a float value for min_segment_dur. See the docstring of the transform for more details on these arguments and how they work.

Type:

dict

__init__(model, num_epochs, batch_size, root_results_dir, dataset_path=None, results_dirname=None, normalize_spectrograms=False, num_workers=2, device='cpu', shuffle=True, val_step=None, ckpt_step=None, patience=None, checkpoint_path=None, spect_scaler_path=None, train_transform_params=None, train_dataset_params=None, val_transform_params=None, val_dataset_params=None, post_tfm_kwargs: dict | None = None) None#

Method generated by attrs for class LearncurveConfig.

Methods

__init__(model, num_epochs, batch_size, ...)

Method generated by attrs for class LearncurveConfig.