salesforce / CoST

PyTorch code for CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting (ICLR 2022)
BSD 3-Clause "New" or "Revised" License
214 stars 43 forks source link

I met a mistake. #20

Open jhzmike opened 1 year ago

jhzmike commented 1 year ago

Traceback (most recent call last): File "D:\skrsuper\python1\pytorch\cost\train.py", line 97, in loss_log = model.fit( File "D:\skrsuper\python1\pytorch\cost\cost.py", line 299, in fit loss = self.cost(x_q, x_k) File "C:\Users\lx.conda\envs\py39\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl return forward_call(*input, kwargs) File "D:\skrsuper\python1\pytorch\cost\cost.py", line 145, in forward q_t, q_s = self.encoder_q(x_q) File "C:\Users\lx.conda\envs\py39\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl return forward_call(*input, *kwargs) File "D:\skrsuper\python1\pytorch\cost\models\encoder.py", line 163, in forward out = mod(x) # b t d File "C:\Users\lx.conda\envs\py39\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl return forward_call(input, kwargs) File "D:\skrsuper\python1\pytorch\cost\models\encoder.py", line 65, in forward output_fft[:, self.start:self.end] = self._forward(input_fft) File "D:\skrsuper\python1\pytorch\cost\models\encoder.py", line 69, in _forward output = torch.einsum('bti,tio->bto', input[:, self.start:self.end], self.weight) File "C:\Users\lx.conda\envs\py39\lib\site-packages\torch\functional.py", line 378, in einsum return _VF.einsum(equation, operands) # type: ignore[attr-defined] RuntimeError: einsum(): subscript t has size 501 for operand 1 which does not broadcast with previously seen size 301