_torch_cat_na¶
- pytorch_forecasting.models.base_model._torch_cat_na(x: List[torch.Tensor]) torch.Tensor [source]¶
Concatenate tensor along
dim=0
and add nans alongdim=1
if necessary.Allows concatenation of tensors where
dim=1
are not equal. Missing values are filled up withnan
.- Parameters
x (List[torch.Tensor]) – list of tensors to concatenate along dimension 0
- Returns
concatenated tensor
- Return type
torch.Tensor