concat_sequences#

pytorch_forecasting.utils.concat_sequences(sequences: List[Tensor] | List[PackedSequence]) Tensor | PackedSequence[source]#

Concatenate RNN sequences.

Parameters:

sequences (Union[List[torch.Tensor], List[rnn.PackedSequence]) – list of RNN packed sequences or tensors of which first index are samples and second are timesteps

Returns:

concatenated sequence

Return type:

Union[torch.Tensor, rnn.PackedSequence]