# Test data size error in TimeSeriesTransformer

**URL:** <https://discuss.huggingface.co/t/test-data-size-error-in-timeseriestransformer/57540>\
**Category:** 🤗Transformers\
**Created:** [October 5, 2023, 8:32pm UTC](https://discuss.huggingface.co/t/test-data-size-error-in-timeseriestransformer/57540 "2023-10-05T20:32:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FelipeMSR](https://avatars.discourse-cdn.com/v4/letter/f/d26b3c/32.png) [@FelipeMSR](https://discuss.huggingface.co/u/FelipeMSR)\
**Post date:** [October 5, 2023, 8:32pm UTC](https://discuss.huggingface.co/t/test-data-size-error-in-timeseriestransformer/57540/1 "2023-10-05T20:32:40Z")

</div>

I am trying to apply TimeSeriesTransformer for the ett dataset, which unlike the huggingface example has num\_dynamic\_real\_features = 6. When I run the following part of the code:  
model.eval()

forecasts =

for batch in test\_dataloader:  
outputs = model.generate(  
static\_categorical\_features=batch[“static\_categorical\_features”].to(device)  
if config.num\_static\_categorical\_features \> 0  
else None,  
static\_real\_features=batch[“static\_real\_features”].to(device)  
if config.num\_static\_real\_features \> 0  
else None,  
past\_time\_features=batch[“past\_time\_features”].to(device),  
past\_values=batch[“past\_values”].to(device),  
future\_time\_features=batch[“future\_time\_features”].to(device),  
past\_observed\_mask=batch[“past\_observed\_mask”].to(device),  
)  
forecasts.append(outputs.sequences.cpu().numpy())

I get this error:  
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 8664 and the array at index 2 has size 8640

The size of the test\_dataset is 8640. The size difference is always a product of prediction\_length, in this case it is 24.

Hope someone can help me
