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

tensor size error #236

Open
lazy-cong opened this issue Sep 28, 2021 · 1 comment
Open

tensor size error #236

lazy-cong opened this issue Sep 28, 2021 · 1 comment

Comments

@lazy-cong
Copy link

Hello, I try to use dgl-ke to train RotatE, but the program cannot be executed. I want to know why, my training command are as follows:

dglke_train --model_name RotatE --dataset FB15k --batch_size 1000 --neg_sample_size 200 --hidden_dim 400
--gamma 16.0 --lr 0.01 --max_step 500 --log_interval 100 --batch_size_eval 16 --test -adv
--regularization_coef 1.00E-07 --num_thread 1 --num_proc 48

and the error:

File "dgl-ke-master\dgl-ke-master\python\dglke\models\pytorch\score_fun.py", line 470, in edge_func
re_score = re_head * re_rel - im_head * im_rel
RuntimeError: The size of tensor a (200) must match the size of tensor b (400) at non-singleton dimension 1

How can i solve this?

@classicsong
Copy link
Contributor

You may need to add --double_ent this argument.

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

2 participants