_torch_cat_na¶
- pytorch_forecasting.models.base_model._torch_cat_na(x: List[torch.Tensor]) torch.Tensor[source]¶
Concatenate tensor along
dim=0and add nans alongdim=1if necessary.Allows concatenation of tensors where
dim=1are 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