vak.config.eval.EvalConfig#
- class vak.config.eval.EvalConfig(checkpoint_path, output_dir, model, batch_size, dataset_path=None, labelmap_path=None, spect_scaler_path=None, post_tfm_kwargs: dict | None = None, num_workers=2, device='cpu', transform_params=None, dataset_params=None)[source]#
Bases:
object
class that represents [EVAL] section of config.toml file
- num_workers#
Number of processes to use for parallel loading of data. Argument to torch.DataLoader. Default is 2.
- Type:
- device#
Device on which to work with model + data. Defaults to ‘cuda’ if torch.cuda.is_available is True.
- Type:
- spect_scaler_path#
path to a saved SpectScaler object used to normalize spectrograms. If spectrograms were normalized and this is not provided, will give incorrect results.
- Type:
- 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.PostProcess`. 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 formin_segment_dur
. See the docstring of the transform for more details on these arguments and how they work.- Type:
- transform_params#
Parameters for data transform. Passed as keyword arguments. Optional, default is None.
- Type:
dict, optional
- dataset_params#
Parameters for dataset. Passed as keyword arguments. Optional, default is None.
- Type:
dict, optional
- __init__(checkpoint_path, output_dir, model, batch_size, dataset_path=None, labelmap_path=None, spect_scaler_path=None, post_tfm_kwargs: dict | None = None, num_workers=2, device='cpu', transform_params=None, dataset_params=None) None #
Method generated by attrs for class EvalConfig.
Methods
__init__
(checkpoint_path, output_dir, model, ...)Method generated by attrs for class EvalConfig.