yuqinie98 / PatchTST

An offical implementation of PatchTST: "A Time Series is Worth 64 Words: Long-term Forecasting with Transformers." (ICLR 2023) https://arxiv.org/abs/2211.14730
Apache License 2.0
1.37k stars 248 forks source link

How to use time_feature #92

Open WZFish opened 6 months ago

WZFish commented 6 months ago

when I set use_time_feature=True ,there are error in code Traceback (most recent call last): File "/root/PatchTST/PatchTST_self_supervised/src/learner.py", line 98, in fit self.one_epoch(train=True)
File "/root/PatchTST/PatchTST_self_supervised/src/learner.py", line 114, in one_epoch self.epoch_train() if train else self.epoch_validate()
File "/root/PatchTST/PatchTST_self_supervised/src/learner.py", line 120, in epoch_train self.all_batches('train') File "/root/PatchTST/PatchTST_self_supervised/src/learner.py", line 137, in allbatches if type == 'train': self.batch_train() File "/root/PatchTST/PatchTST_self_supervised/src/learner.py", line 143, in batch_train self('before_batch_train') File "/root/PatchTST/PatchTST_self_supervised/src/learner.py", line 370, in call if attr is not None: attr() File "/root/PatchTST/PatchTST_self_supervised/src/callback/core.py", line 41, in before_batch_train def before_batch_train(self): self._to_device() File "/root/PatchTST/PatchTST_self_supervised/src/callback/core.py", line 48, in _to_devicepython-BaseException if self.n_inp > 1: xb, yb = batch ValueError: too many values to unpack (expected 2)

How can I use time feature?