You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
您好!作者。
我在使用自己的数据集复现您的代码时,首先使用TSformer.py生成pt文件(修改了input_len=247已经num_tokens=247/12),在STEP.py上预测output_len=12时能够顺利复现您的代码,并取得优秀性能!
但改变STEP.py文件中的output_len=48后,出现以下报错:
Traceback (most recent call last):
File "/mnt/3.6TB-DATA/liji/BasicTS-master/experiments/train.py", line 29, in
main()
File "/mnt/3.6TB-DATA/liji/BasicTS-master/experiments/train.py", line 23, in main
basicts.launch_training(args.cfg, args.gpus, node_rank=0)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/launcher.py", line 118, in launch_training
easytorch.launch_training(cfg=cfg, devices=gpus, node_rank=node_rank)
File "/home/pcz4514/anaconda3/envs/liji_graph/lib/python3.9/site-packages/easytorch/launcher/launcher.py", line 86, in launch_training
train_dist(cfg)
File "/home/pcz4514/anaconda3/envs/liji_graph/lib/python3.9/site-packages/easytorch/launcher/launcher.py", line 35, in training_func
raise e
File "/home/pcz4514/anaconda3/envs/liji_graph/lib/python3.9/site-packages/easytorch/launcher/launcher.py", line 31, in training_func
runner.train(cfg)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/runners/base_epoch_runner.py", line 430, in train
loss = self.train_iters(epoch, iter_index, data)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/runners/base_tsf_runner.py", line 345, in train_iters
loss = self.metric_forward(self.loss, forward_return)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/runners/base_tsf_runner.py", line 321, in metric_forward
metric_item = metric_func(**args)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/baselines/STEP/loss/step_loss.py", line 13, in step_loss
loss_pred = masked_mae(prediction=prediction, target=target, null_val=null_val)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/metrics/mae.py", line 34, in masked_mae
loss = torch.abs(prediction - target)
RuntimeError: The size of tensor a (37) must match the size of tensor b (5) at non-singleton dimension 3
请问是否是STEP.py中还有相应参数需要改变,您是否可以解答该问题,谢谢!
The text was updated successfully, but these errors were encountered:
您好!作者。
我在使用自己的数据集复现您的代码时,首先使用TSformer.py生成pt文件(修改了input_len=247已经num_tokens=247/12),在STEP.py上预测output_len=12时能够顺利复现您的代码,并取得优秀性能!
但改变STEP.py文件中的output_len=48后,出现以下报错:
Traceback (most recent call last):
File "/mnt/3.6TB-DATA/liji/BasicTS-master/experiments/train.py", line 29, in
main()
File "/mnt/3.6TB-DATA/liji/BasicTS-master/experiments/train.py", line 23, in main
basicts.launch_training(args.cfg, args.gpus, node_rank=0)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/launcher.py", line 118, in launch_training
easytorch.launch_training(cfg=cfg, devices=gpus, node_rank=node_rank)
File "/home/pcz4514/anaconda3/envs/liji_graph/lib/python3.9/site-packages/easytorch/launcher/launcher.py", line 86, in launch_training
train_dist(cfg)
File "/home/pcz4514/anaconda3/envs/liji_graph/lib/python3.9/site-packages/easytorch/launcher/launcher.py", line 35, in training_func
raise e
File "/home/pcz4514/anaconda3/envs/liji_graph/lib/python3.9/site-packages/easytorch/launcher/launcher.py", line 31, in training_func
runner.train(cfg)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/runners/base_epoch_runner.py", line 430, in train
loss = self.train_iters(epoch, iter_index, data)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/runners/base_tsf_runner.py", line 345, in train_iters
loss = self.metric_forward(self.loss, forward_return)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/runners/base_tsf_runner.py", line 321, in metric_forward
metric_item = metric_func(**args)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/baselines/STEP/loss/step_loss.py", line 13, in step_loss
loss_pred = masked_mae(prediction=prediction, target=target, null_val=null_val)
File "/mnt/3.6TB-DATA/liji/BasicTS-master/basicts/metrics/mae.py", line 34, in masked_mae
loss = torch.abs(prediction - target)
RuntimeError: The size of tensor a (37) must match the size of tensor b (5) at non-singleton dimension 3
请问是否是STEP.py中还有相应参数需要改变,您是否可以解答该问题,谢谢!
The text was updated successfully, but these errors were encountered: