Resizing1D
PythonResize signals with bicubic interpolation during training and inference.
Resizing1D(duration: int, target_interpolation: str | None = None, **kwargs={})Resize signals with bicubic interpolation during training and inference.
Selected masks use nearest-neighbor indices and retain their dtype. Selected targets require an explicit interpolation policy.
Base class: BaseAugmentation1D.
Inherited from BaseAugmentation: augment_sample(), batch_augment(), call(), get_random_transformations().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
duration | int | Required | Positive output length in samples. |
target_interpolation | str | None | None | "nearest" preserves discrete target values; "signal" uses the signal interpolation and compute dtype. None rejects resizing selected aligned targets. |
**kwargs | Any | {} | Base augmentation options, including data_format, aligned_targets and aligned_masks. |
Raises
| Type | Description |
|---|---|
ValueError | An output dimension is nonpositive, the target policy is invalid, or selected targets have no interpolation policy. |
training_only
Pythontraining_only = Falsejoint
Pythonjoint = Trueduration
Pythonduration = durationtarget_interpolation
Pythontarget_interpolation = _target_policy(target_interpolation)augment_samples
Pythonaugment_samples(inputs)augment_targets
Pythonaugment_targets(inputs)augment_masks
Pythonaugment_masks(inputs)get_config
Pythonget_config()