yuetan031 / TADDY_pytorch

A Pytorch implement of paper "Anomaly detection in dynamic graphs via transformer" (TADDY).
MIT License
49 stars 13 forks source link

ValueError: row index exceeds matrix dimensions #4

Open Yunx1aoyuj1 opened 2 years ago

Yunx1aoyuj1 commented 2 years ago

File "C:\Users\16645\Desktop\代码\Anomaly Detection in Dynamic Graphs via\1_train.py", line 56, in setting_obj.run() File "C:\Users\16645\Desktop\代码\Anomaly Detection in Dynamic Graphs via\codes\Settings.py", line 8, in run loaded_data = self.dataset.load() File "C:\Users\16645\Desktop\代码\Anomaly Detection in Dynamic Graphs via\codes\DynamicDatasetLoader.py", line 173, in load adjs, eigen_adjs = self.get_adjs(rows, cols, weights, nb_nodes) File "C:\Users\16645\Desktop\代码\Anomaly Detection in Dynamic Graphs via\codes\DynamicDatasetLoader.py", line 142, in get_adjs adj = sp.csr_matrix((weights[i], (rows[i], cols[i])), shape=(nb_nodes, nb_nodes), dtype=np.float32) File "C:\aconda\envs\python38\lib\site-packages\scipy\sparse\compressed.py", line 54, in init other = self.class(coo_matrix(arg1, shape=shape)) File "C:\aconda\envs\python38\lib\site-packages\scipy\sparse\coo.py", line 196, in init self._check() File "C:\aconda\envs\python38\lib\site-packages\scipy\sparse\coo.py", line 283, in _check raise ValueError('row index exceeds matrix dimensions')

MrRobotsAA commented 1 year ago

换一台有gpu的机器跑就ok了

foureye commented 10 months ago

请问这个问题解决了吗?我电脑有GPU还是报错。

davidshumway commented 9 months ago

My dataframe index was using DatetimeIndex, so resetting this fixed the issue for me.

LandingGuy1 commented 1 month ago

请问是怎么解决的呢?我也遇到了同样的问题,求好心大佬解答