lawhy commited on
Commit
5aa77ac
·
verified ·
1 Parent(s): 7f5c113

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -69,8 +69,8 @@ Use the entity embeddings to predict the subsumption relationships between them.
69
 
70
  ```python
71
  # suppose we want to compare "personal computer" and "computer", "berry" and "fruit"
72
- child_entity_embeddings = model.encode(["personal computer", "berry"])
73
- parent_entity_embeddings = model.encode(["computer", "fruit"])
74
 
75
  # compute the hyperbolic distances and norms of entity embeddings
76
  dists = model.manifold.dist(child_entity_embeddings, parent_entity_embeddings)
 
69
 
70
  ```python
71
  # suppose we want to compare "personal computer" and "computer", "berry" and "fruit"
72
+ child_entity_embeddings = model.encode(["personal computer", "berry"], convert_to_tensor=True)
73
+ parent_entity_embeddings = model.encode(["computer", "fruit"], convert_to_tensor=True)
74
 
75
  # compute the hyperbolic distances and norms of entity embeddings
76
  dists = model.manifold.dist(child_entity_embeddings, parent_entity_embeddings)