_torch_cat_na#

pytorch_forecasting.models.base_model._torch_cat_na(x: List[Tensor]) Tensor[source]#

Concatenate tensor along dim=0 and add nans along dim=1 if necessary.

Allows concatenation of tensors where dim=1 are not equal. Missing values are filled up with nan.

Parameters

x (List[torch.Tensor]) – list of tensors to concatenate along dimension 0

Returns

concatenated tensor

Return type

torch.Tensor