TimeMixer icon indicating copy to clipboard operation
TimeMixer copied to clipboard

Unmatch between shape of x and x_mark

Open orangehe opened this issue 10 months ago • 1 comments

https://github.com/kwuking/TimeMixer/blame/8d230b7d785d73104522d4cb954e2d4fba1412a4/models/TimeMixer.py#L320

since pooling for x was conducted in the floor mode, slicing x_mark using [:,::window_size,:] will lead to the unmatch size bewtween shape of x and x_mark.

the code could be modified to the following:

if x_mark_enc is not None: ds_len = int(x_mark_enc_mark_ori.shape[1]/self.configs.down_sampling_window)*self.configs.down_sampling_window x_mark_sampling_list.append(x_mark_enc_mark_ori[:, :ds_len:self.configs.down_sampling_window, :]) x_mark_enc_mark_ori = x_mark_enc_mark_ori[:, :ds_len:self.configs.down_sampling_window, :]

orangehe avatar Mar 10 '25 07:03 orangehe

Thank you very much for your suggestion. We will test according to your plan. Thank you again for your support of our work.

kevinliu2000 avatar Apr 10 '25 15:04 kevinliu2000