espnet2.layers.time_warp.TimeWarp
Less than 1 minute
espnet2.layers.time_warp.TimeWarp
class espnet2.layers.time_warp.TimeWarp(window: int = 80, mode: str = 'bicubic')
Bases: Module
Time warping using torch.interpolate.
- Parameters:
- window – time warp parameter
- mode – Interpolate mode
Initializes internal Module state, shared by both nn.Module and ScriptModule.
extra_repr()
Set the extra representation of the module
To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
forward(x: Tensor, x_lengths: Tensor | None = None)
Forward function.
- Parameters:
- x – (Batch, Time, Freq)
- x_lengths – (Batch,)