petecheng / Time2Graph

Source codes for Time2Graph model.
133 stars 33 forks source link

IndexError: list index out of range #6

Open cchongma opened 1 year ago

cchongma commented 1 year ago

师兄好!我在运行这个代码时,出现了这个错误,发现是索引值错误, 由于输入数据是50*64,于是将embed_size改为64,但还是不对。发现是由于representation_size赋值给embed_size,但不知在哪修改 具体错误如下: Traceback (most recent call last): File "E:\Users\Time2Graph-master\scripts\std_test.py", line 75, in m.fit(X=x_train, Y=y_train, n_splits=args.n_splits, tuning=False, opt_args=xgb_options) File "E:\Users\Time2Graph-master\time2graph\core\model.py", line 158, in fit self.t2g.fit_embedding_model(x=X, y=Y, cache_dir=cache_dir) File "E:\Users\Time2Graph-master\time2graph\core\model_embeds.py", line 117, in fit_embedding_model shapelets=self.shapelets, warp=self.warp, init=init) File "E:\Users\Time2Graph-master\time2graph\core\shapelet_embedding.py", line 157, in fit cache_dir=self.cache_dir, **self.deepwalk_args) File "E:\Users\Time2Graph-master\time2graph\core\shapelet_utils.py", line 361, in graph_embedding ret.append(embedding2mat(fpath=embedding_path, num_vertices=num_shapelet, embed_size=embed_size)) File "E:\Users\Time2Graph-master\time2graph\core\shapelet_utils.py", line 319, in embedding2mat mat[idx, k] = float(line[k + 1]) IndexError: list index out of range