Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在执行exp_long_term_forecasting第122行时遇到维度不匹配 #379

Open
feng1201 opened this issue Apr 9, 2024 · 0 comments
Open

Comments

@feng1201
Copy link

feng1201 commented Apr 9, 2024

您好,我在使用Time-Series-Library进行时间序列预测时遇到了一个问题。当我尝试运行exp_long_term_forecasting的第122行代码时,遇到了一个维度不匹配的错误。

步骤:

  1. 加载ETTh1数据集。
  2. 设置模型参数为:--task_name long_term_forecast --is_training 1 --model_id your_model_id --model DLinear --data ETTh1 --root_path F:\ETDataset-main\ETT-small --data_path ETTh1.csv --features M --target OT --freq h --checkpoints ./checkpoints/ --seq_len 96 --label_len 48 --pred_len 48 --seasonal_patterns Monthly --inverse --top_k 5 --num_kernels 6 --enc_in 7 --dec_in 7 --c_out 7 --d_model 512 --n_heads 8 --e_layers 2 --d_layers 1 --d_ff 2048 --moving_avg 25 --factor 1 --dropout 0.1 --embed timeF --activation gelu --output_attention --channel_independence 0 --num_workers 10 --itr 1 --train_epochs 10 --batch_size 32 --patience 3 --learning_rate 0.0001 --des test --loss MSE --lradj type1 --use_amp --use_gpu True --gpu 0 --p_hidden_dims 128 128 --p_hidden_layers 2
  3. 运行至第122行时出现错误。

运行结果:出现了RuntimeError,提示维度不匹配。

环境信息:

  • 操作系统:Windows 10
  • Python版本:3.8
  • PyTorch版本: 1.12.1
  • CUDA版本: 11.3

我已经尝试查看相关文档和搜索可能的解决方案,但没有找到解决这个问题的方法。
最后,我想询问这个问题是否是由于我自己对代码的理解不足或者是我没有正确实现某些步骤所导致的。我的编程基础并不牢固,因此很有可能我没有完全理解您代码的意图或者是我遗漏了一些重要的实现细节。如果是这样的话,我将非常感激如果您能指出我哪里做错了,或者提供一些改进的建议。我非常愿意学习并改正我的错误,以便更好地使用这个库。

感谢您的时间和努力,以及您对开源社区的贡献!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant