gzerveas / mvts_transformer

Multivariate Time Series Transformer, public version
MIT License
750 stars 173 forks source link

inquiry on error called : IndexError: too many indices for tensor of dimension 1 #64

Closed harrykwon0524 closed 10 months ago

harrykwon0524 commented 10 months ago

Hello @gzerveas I modified my dataset to duplicate the shape of SpokenArabicDigits dataset and ran up with an issue on an error called 'IndexError: too many indices for tensor of dimension 1'

first second 화면 캡처 2023-11-28 170929

I assume it has to be related to the feature choice or parameters on the features. Will it be possible for you to tell why such error is occuring? I tried changing the number of dimensions section on the dataset but had the same issue. Your advice/answer would be greatly appreciated. Thank you

harrykwon0524 commented 10 months ago

solved this issue by adding these lines: feature = features[i] if feature.ndim == 1: feature = feature.unsqueeze(-1) X[i, :end, :] = feature[:end, :]