Generate method Time Series Transformer throws an error
Author: yurkoff-mv
Pull request: no

### System Info

- `transformers` version: 4.28.1
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.9
- Huggingface_hub version: 0.13.4
- Safetensors version: not installed
- PyTorch version (GPU?): 1.13.1+cu117 (True)      
- Tensorflow version (GPU?): not installed (NA)    
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

### Who can help?

 @ArthurZucker, @younesbelkada, @sgugger

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```
import torch
from transformers import TimeSeriesTransformerConfig, TimeSeriesTransformerForPrediction


batch_size = 32
context_length = 100
prediction_length = 1
input_size = 25
num_time_features = 1

config = TimeSeriesTransformerConfig(prediction_length=prediction_length,
                                     context_length=context_length,
                                     input_size=input_size,
                                     lags_sequence=[0],
                                     num_time_features=num_time_features,
                                     num_static_categorical_features=0,
                                     num_static_real_features=0,
                                     num_dynamic_real_features=0,
                                     embedding_dimension=64,
                                     encoder_ffn_dim=32,
                                     decoder_ffn_dim=32,
                                     encoder_attention_heads=2,
                                     decoder_attention_heads=2,
                                     encoder_layers=2,
                                     decoder_layers=2,
                                     is_encoder_decoder=True,
                                     activation_function="gelu",
                                     d_model=64,
                                     dropout=0.1,
                                     encoder_layerdrop=0.1,
                                     decoder_layerdrop=0.1,
                                     attention_dropout=0.1,
                                     activation_dropout=0.1,
                                     num_parallel_samples=100,
                                     init_std=0.02
                                     )

model = TimeSeriesTransformerForPrediction(config)

outputs = model.generate(past_values=torch.empty((batch_size, context_length, input_size)),
                         past_time_features=torch.empty((batch_size, context_length, num_time_features)),
                         past_observed_mask=torch.ones((batch_size, context_length, input_size)),
                         future_time_features=torch.empty((batch_size, prediction_length, input_size)),
                         )

print(outputs.keys())
```

```
File ".\venv\lib\site-packages\transformers\models\time_series_transformer\modeling_time_series_transformer.py", line 1807, in generate
    decoder_input = torch.cat((reshaped_lagged_sequence, repeated_features[:, : k + 1]), dim=-1)
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 100 but got size 1 for tensor number 1 in the list.
```

Error in this row:
```
decoder_input = torch.cat((reshaped_lagged_sequence, repeated_features[:, : k + 1]), dim=-1)
```

An attempt to concatenate tensors with dimensions `[3200, 100, 25]` and `[3200, 1, 75]`.

### Expected behavior

I expected to get the correct result of the model.

Comments:
cc @gante 

@amyeroberts -- `TimeSeriesTransformerForPrediction` has its own `generate` method, so I'm passing the tag to @kashif, who implemented it 🤗 

@yurkoff-mv the issue is that the `lags_sequence=[1]` and then the size of the past values and past time features needs to be larger. Let me paste an example below

```python
import torch
from transformers import TimeSeriesTransformerConfig, TimeSeriesTransformerForPrediction


batch_size = 32
context_length = 100
prediction_length = 1
input_size = 25
num_time_features = 1
lags_sequence = [1]

config = TimeSeriesTransformerConfig(prediction_length=prediction_length,
                                     context_length=context_length,
                                     input_size=input_size,
                                     lags_sequence=lags_sequence,
                                     num_time_features=num_time_features,
                                     num_static_categorical_features=0,
                                     num_static_real_features=0,
                                     num_dynamic_real_features=0,
                                     embedding_dimension=64,
                                     encoder_ffn_dim=32,
                                     decoder_ffn_dim=32,
                                     encoder_attention_heads=2,
                                     decoder_attention_heads=2,
                                     encoder_layers=2,
                                     decoder_layers=2,
                                     is_encoder_decoder=True,
                                     activation_function="gelu",
                                     d_model=64,
                                     dropout=0.1,
                                     encoder_layerdrop=0.1,
                                     decoder_layerdrop=0.1,
                                     attention_dropout=0.1,
                                     activation_dropout=0.1,
                                     num_parallel_samples=100,
                                     init_std=0.02
                                     )

model = TimeSeriesTransformerForPrediction(config)


# input past seq length is context_length plus largest lag value:
outputs = model.generate(past_values=torch.randn((batch_size, context_length+max(lags_sequence), input_size)),
                         past_time_features=torch.randn((batch_size, context_length+max(lags_sequence), num_time_features)),
                         past_observed_mask=torch.ones((batch_size, context_length+max(lags_sequence), input_size)),
                         future_time_features=torch.randn((batch_size, prediction_length, num_time_features)),
                         )

print(outputs.keys())

outputs['sequences'].shape
# torch.Size([32, 100, 1, 25]) [batch_size, num_parallel_samples, prediction_length, input_size]
```

Thank you! It's Working for me!