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

Problem with ConvE and "KgeModel.load_from_checkpoint(checkpoint)" #52

Closed
Nzteb opened this issue Oct 10, 2019 · 1 comment
Closed

Problem with ConvE and "KgeModel.load_from_checkpoint(checkpoint)" #52

Nzteb opened this issue Oct 10, 2019 · 1 comment

Comments

@Nzteb
Copy link
Contributor

Nzteb commented Oct 10, 2019

I'm having some problems but I cannot get fully behind it and I'm not sure if Iam doing something wrong so I rather ask for help.

Training toy-conve-train.yaml and then loading it from any checkpoint with KgeModel.load_from_checkpoint(checkpoint) results in a long torch error about a dimension mismatch (Resuming the ConvE job with the normal resume functionality is no problem and does work, it does not use this function).

The error is raised here https://github.com/uma-pi1/kge/blob/master/kge/model/kge_model.py#L368

I could find out that this config
https://github.com/uma-pi1/kge/blob/master/kge/model/kge_model.py#L364
seems to be different in the key "entity_embedder.dim" from the original config with which the job was run. For example, when I substitute it and by hand load the original config, then it seems to work.
Somehow the problem might be connected with the lines here
https://github.com/uma-pi1/kge/blob/master/kge/model/conve.py#L116
because I tried to outcomment them and it seemed to work.

@rgemulla
Copy link
Member

Somebody used a dirty hack in ConvE. I added another dirty hack to fix this problem.

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