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

作者您好,想请教一下关于data/P/P_rn_adj.npy的报错 #12

Open
sugar-hub opened this issue Dec 15, 2024 · 3 comments
Open

作者您好,想请教一下关于data/P/P_rn_adj.npy的报错 #12

sugar-hub opened this issue Dec 15, 2024 · 3 comments

Comments

@sugar-hub
Copy link

作者您好,很感谢您和团队的贡献。我想尝试使用PEMS04数据集来训练OpenCity模型,却报了以下错误,不知这个数据要如何生成。

root@autodl-container-8763409469-e14ba964:~/autodl-tmp/OpenCity-main/model# python Run.py -mode pretrain -model OpenCity -save_pretrain_path OpenCity-mini2.0.pth -batch_size 16 --embed_dim 128 --skip_dim 128 --enc_depth 3
/root/autodl-tmp/OpenCity-main
Traceback (most recent call last):
File "Run.py", line 30, in
args_predictor = get_predictor_params(args)
File "/root/autodl-tmp/OpenCity-main/lib/Params_predictor.py", line 59, in get_predictor_params
args_predictor = parse_args(parser_pred, args)
File "/root/autodl-tmp/OpenCity-main/model/OpenCity/args.py", line 78, in parse_args
A = np.load(args_predictor.filepath + f'{dataset_select}_rn_adj.npy')
File "/root/miniconda3/lib/python3.8/site-packages/numpy/lib/npyio.py", line 407, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '../data/P/P_rn_adj.npy'

@LZH-YS1998
Copy link
Collaborator

您好。邻接矩阵文件已经包含在数据文件中,可能是数据集参数设置方式的问题。可以试试在conf/general_conf/pretrain.conf的dataset_use中设置PEMS04数据集。

@sugar-hub
Copy link
Author

谢谢作者的回复!我发现OpenCity输出的向量最后一个维度是1,在评价标准中只能用MAE、RMSE和MAPE的平均值与其他模型作对比。OpenCity能否像其他常见交通流预测模型一样,预测从Horizon 1到Horizon 12的时间段呢?我尝试修改了几次OpenCity都失败了

@LZH-YS1998
Copy link
Collaborator

可以的。最后一个维度是特征维度,时间维度应该在第二维度中,可以计算每个时间步的误差指标。

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

2 participants