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

Typo in sample code of README.md #8

Open
suhara opened this issue Jun 20, 2018 · 0 comments
Open

Typo in sample code of README.md #8

suhara opened this issue Jun 20, 2018 · 0 comments

Comments

@suhara
Copy link

suhara commented Jun 20, 2018

The sample code in README.md has typo. I figured it out after seeing IndexError.

from skge import HolE, StochasticTrainer

# Load knowledge graph 
# N = number of entities
# M = number of relations
# xs = list of (subject, object, predicte) triples
# ys = list of truth values for triples (1 = true, -1 = false)
N, M, xs, ys = load_data('path to data')

# instantiate HolE with an embedding space of size 100
model = HolE((N, N, M), 100)

The order of (N, N, M) must be (N, M, N).

model = HolE((N, M, N), 100)
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