pytorch_forecasting.utils.
padded_stack
Stack tensors along first dimension and pad them along last dimension to ensure their size is equal.
tensors (List[torch.Tensor]) – list of tensors to stack
side (str) – side on which to pad - “left” or “right”. Defaults to “right”.
mode (str) – ‘constant’, ‘reflect’, ‘replicate’ or ‘circular’. Default: ‘constant’
value (Union[int, float]) – value to use for constant padding
stacked tensor
torch.Tensor