starxingwang / AHSTGNN

Adaptive Hybrid Spatial-Temporal Graph Neural Network for Cellular Traffic Prediction
MIT License
11 stars 2 forks source link

AHSTGNN #3

Open NoHesitation1 opened 6 months ago

NoHesitation1 commented 6 months ago

请问论文中提到的指数距离衰减矩阵作为GAT先验图,在代码的哪个部分

0108hc commented 6 months ago

你好,请问你的代码复现成功了吗?我现在出现以下报错,并不知道如何修改: Traceback (most recent call last): File "H:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev\pydevd.py", line 1496, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "H:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "H:\下载\AHSTGNN-main\train.py", line 235, in main() File "H:\下载\AHSTGNN-main\train.py", line 113, in main metrics = engine.train(trainx1, trainx2, trainx3, trainy[:, 0, :, :]) File "H:\下载\AHSTGNN-main\engine.py", line 32, in train output = self.model([input1, input2, input3]) File "C:\Users\11146\Anaconda3\envs\pytorch11\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "H:\下载\AHSTGNN-main\model.py", line 359, in forward x_ds = self.GATs[i](x_t, self.supports[0]) IndexError: list index out of range

NoHesitation1 commented 6 months ago

你好,请问你的代码复现成功了吗?我现在出现以下报错,并不知道如何修改: Traceback (most recent call last): File "H:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev\pydevd.py", line 1496, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "H:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "H:\下载\AHSTGNN-main\train.py", line 235, in main() File "H:\下载\AHSTGNN-main\train.py", line 113, in main metrics = engine.train(trainx1, trainx2, trainx3, trainy[:, 0, :, :]) File "H:\下载\AHSTGNN-main\engine.py", line 32, in train output = self.model([input1, input2, input3]) File "C:\Users\11146\Anaconda3\envs\pytorch11\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "H:\下载\AHSTGNN-main\model.py", line 359, in forward x_ds = self.GATs[i](x_t, self.supports[0]) IndexError: list index out of range 我复现成功了 但是这个报错我好像没遇到过

0108hc commented 6 months ago

您好请问,您有对他的代码进行修改吗,还是直接运行成功的。不确定是不是我本地环境有无

NoHesitation1 commented 6 months ago

您好请问,您有对他的代码进行修改吗,还是直接运行成功的。不确定是不是我本地环境有无

我记得是直接运行成功的。代码环境可能需要检查一下,比如它要求python3.9

0108hc commented 6 months ago

我重新配置全新的了环境,并且原封不动的down了代码,然后依旧报错,请问您有如下报错吗? 在model.py中,261行gcn_bool=true and addaptadj=true进入if,aptinit is None进入if,按理来讲应该有nodevec1???

File "C:\Users\Anaconda3\envs\pytorch2\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "h:\下载\AHSTGNN-main\model.py", line 355, in forward n_q_t = self.w_ti.squeeze() File "C:\Users\Anaconda3\envs\pytorch2\lib\site-packages\torch\nn\modules\module.py", line 1185, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'gwnet' object has no attribute 'nodevec1'

0108hc commented 6 months ago

如果方便,请问您可以将复现的代码发送至我的邮箱吗?万分感谢,我的邮箱是hhhc1113@163.com,不胜感激~~~

OvOYu commented 4 months ago

江苏的数据集请问有吗

xxsenior commented 4 months ago

我重新配置全新的了环境,并且原封不动的down了代码,然后依旧报错,请问您有如下报错吗? 在model.py中,261行gcn_bool=true and addaptadj=true进入if,aptinit is None进入if,按理来讲应该有nodevec1???

File "C:\Users\Anaconda3\envs\pytorch2\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, kwargs) File "h:\下载\AHSTGNN-main\model.py", line 355, in forward n_q_t = self.w_ti.squeeze() File "C:\Users\Anaconda3\envs\pytorch2\lib\site-packages\torch\nn\modules\module.py", line 1185, in getattr** raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'gwnet' object has no attribute 'nodevec1'

请问这个问题解决了吗?我也遇到这个问题了,不知道怎么处理

OvOYu commented 4 months ago

你有江苏的数据集吗

xxkwon commented 1 week ago

亲测已解决!在终端直接输入python train.py --gcn_bool --adjtype doubletransition --addaptadj --randomadj就不会报错啦