transformer-time-series-prediction
transformer-time-series-prediction copied to clipboard
There seems to be something wrong (or I may be wrong!) in the single step `get_batch` function
I believe that
input = torch.stack([item[0] for item in data]).view((input_window,batch_len,1))
should be changed to
input = torch.stack([item[0] for item in data]).T.unsqueeze(-1)
.
This is because the orders are not correct if the first part is used. (the inputs that go into the transformer is incorrect (i.e. it doesn't go like t=0, t=1, t=2,... )