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

Embedding error #13

Open
svatoma1 opened this issue Apr 30, 2020 · 0 comments
Open

Embedding error #13

svatoma1 opened this issue Apr 30, 2020 · 0 comments

Comments

@svatoma1
Copy link

When using a dataset with more relations than constants (e.g. Nations) the following error raises:

InvalidArgumentError (see above for traceback): indices[3] = 16 is not in [0, 16) [[Node: embedding_lookup_1 = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@Variable"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Variable/read, strided_slice_1)]]

It's a slightly extended Toy dataset (adding new 9 relations). It's most likely caused by restricting embedding's lookup values by the number of entities (which is, in this case, lower than the number of relations). Is this fix appropriate?

file: common/model_builder.py
line: 28 & 29
input_shape = [max(int(encoder_settings['EntityCount']),int(encoder_settings['RelationCount'])), int(encoder_settings['CodeDimension'])]

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