LibCity / Bigscity-LibCity

LibCity: An Open Library for Urban Spatial-temporal Data Mining
https://libcity.ai/
Apache License 2.0
937 stars 168 forks source link

作者您好,MTGNN运行报错 #352

Closed ZPFPHD closed 1 year ago

ZPFPHD commented 1 year ago

下面是报错信息,提示所选索引 k 超出范围,我没有搞清楚是什么问题,请您指点以下,谢谢!

File "D:\pycharmproject\Bigscity-LibCity-master\libcity\executor\mtgnn_executor.py", line 194, in _train_epoch loss = loss_func(batch, idx=idx, batches_seen=batches_seen) File "D:\pycharmproject\Bigscity-LibCity-master\libcity\model\traffic_speed_prediction\MTGNN.py", line 516, in calculate_loss y_predicted = self.predict(batch_new, idx) File "D:\pycharmproject\Bigscity-LibCity-master\libcity\model\traffic_speed_prediction\MTGNN.py", line 539, in predict return self.forward(batch, idx) File "D:\pycharmproject\Bigscity-LibCity-master\libcity\model\traffic_speed_prediction\MTGNN.py", line 476, in forward adp = self.gc(idx) File "D:\anaconda\envs\bigscity\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "D:\pycharmproject\Bigscity-LibCity-master\libcity\model\traffic_speed_prediction\MTGNN.py", line 187, in forward s1, t1 = adj.topk(self.k, 1) RuntimeError: selected index k out of range

ZPFPHD commented 1 year ago

作者您好,还有一个问题是,bigscity预测12步的MAE,是每一步的MAE,还是多步MAE的平均值?比如说第12步的MAE是,单纯12步的MAE,还是1步-12步MAE的平均值?

aptx1231 commented 1 year ago

代码跑的什么命令,这个看不出来是哪里的错误

aptx1231 commented 1 year ago

作者您好,还有一个问题是,bigscity预测12步的MAE,是每一步的MAE,还是多步MAE的平均值?比如说第12步的MAE是,单纯12步的MAE,还是1步-12步MAE的平均值?

都可以 ,设置评测模型 single或者average

ZPFPHD commented 1 year ago

代码跑的什么命令,这个看不出来是哪里的错误

python run_model.py --task traffic_state_pred --model MTGNN --dataset METR_LA,就是正常运行指令,其他模型可以运行,是版本冲突问题吗?

ZPFPHD commented 1 year ago

作者您好,还有一个问题是,bigscity预测12步的MAE,是每一步的MAE,还是多步MAE的平均值?比如说第12步的MAE是,单纯12步的MAE,还是1步-12步MAE的平均值?

都可以 ,设置评测模型 single或者average

能否具体说明下在哪个文件夹路径吗

aptx1231 commented 1 year ago

代码跑的什么命令,这个看不出来是哪里的错误

python run_model.py --task traffic_state_pred --model MTGNN --dataset METR_LA,就是正常运行指令,其他模型可以运行,是版本冲突问题吗?

那估计是版本配置问题了

aptx1231 commented 1 year ago

作者您好,还有一个问题是,bigscity预测12步的MAE,是每一步的MAE,还是多步MAE的平均值?比如说第12步的MAE是,单纯12步的MAE,还是1步-12步MAE的平均值?

都可以 ,设置评测模型 single或者average

能否具体说明下在哪个文件夹路径吗

evaluator/traffic_state_evaluator.py