Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行代码报错 #2

Open
dbbice opened this issue Jan 16, 2024 · 0 comments
Open

运行代码报错 #2

dbbice opened this issue Jan 16, 2024 · 0 comments

Comments

@dbbice
Copy link

dbbice commented Jan 16, 2024

张同学:
您好~我在运行您的代码时遇到以下错误:
Namespace(batch_size=128, channels=200, dataset='FB15k-237', decoder='distmult', dropout_rate=0.2, embedding_dim=200, eval_every=1, final_act=False, final_bn=False, final_drop=False, gamma=9.0, gc1_emb_size=150, gpu=0, init_emb_size=100, input_dropout=0, kernel_size=5, lr=0.002, n_epochs=5000, n_layer=2, name='debug', num_workers=2, patience=100, rat=False, seed=12345, ss=-1, wni=False, wsi=False)

entities: 14541

relations: 237

edges: 272115

14541 475
Graph(num_nodes=14541, num_edges=558771,
ndata_schemes={}
edata_schemes={})
start training...
Traceback (most recent call last):
File "E:/MLingual/second/GCN4KGC-main/WGCN/run.py", line 485, in
main(args)
File "E:/MLingual/second/GCN4KGC-main/WGCN/run.py", line 395, in main
pred = model.forward(g, all_rel, e1_batch, rel_batch, entity_id)
File "E:/MLingual/second/GCN4KGC-main/WGCN/run.py", line 223, in forward
e1_embedded = e1_embedded_all[e1]
IndexError: tensors used as indices must be long, byte or bool tensors

请问该如何解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant