Skip to content

IndexError: list index out of range #6

Description

@cchongma

师兄好!我在运行这个代码时,出现了这个错误,发现是索引值错误,
由于输入数据是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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions