hookeai.miscellaneous.pruning.pruning_dataset.get_n_prun_sample¶
- get_n_prun_sample(prun_scheduler_type, prun_scheduler_params, dev_dataset)[source]¶
Get number of pruned samples.
- Parameters:
prun_scheduler_type ({'constant', 'proportional'}) – Pruning scheduler type defining the number of pruned samples in each pruning iteration. ‘constant’ sets a constant number of pruned samples, while ‘proportional’ sets the number of pruned samples as a ratio of the current development data set size.
prun_scheduler_params (dict) – Pruning scheduler type parameters.
dev_dataset (torch.utils.data.Dataset) – Time series development data set. Each sample is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).
- Returns:
n_prun_sample – Number of pruned samples.
- Return type: