Skip to content

Commit 844ea1a

Browse files
Merge pull request #64 from chamii22:master
PiperOrigin-RevId: 329334887
2 parents 4a9a64d + b8fb060 commit 844ea1a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

research/kg_hyp_emb/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ def get_queries(self, input_tensor):
9696
If you use the codes, please cite the following paper [6]:
9797

9898
```
99-
TODO: add bibtex
99+
@article{chami2020low,
100+
title={Low-Dimensional Hyperbolic Knowledge Graph Embeddings},
101+
author={Chami, Ines and Wolf, Adva and Juan, Da-Cheng and Sala, Frederic and Ravi, Sujith and R{\'e}, Christopher},
102+
journal={arXiv preprint arXiv:2005.00545},
103+
year={2020}
104+
}
100105
```
101106

102107
## References

research/kg_hyp_emb/utils/euclidean.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def givens_reflection(r, x):
5757
givens = givens / tf.norm(givens, ord=2, axis=-1, keepdims=True)
5858
x = tf.reshape(x, (batch_size, -1, 2))
5959
x_ref = givens[:, :, 0:1] * tf.concat(
60-
(x[:, :, 0:1], -x[:, :, :1]), axis=-1) + givens[:, :, 1:] * tf.concat(
60+
(x[:, :, 0:1], -x[:, :, 1:]), axis=-1) + givens[:, :, 1:] * tf.concat(
6161
(x[:, :, 1:], x[:, :, 0:1]), axis=-1)
6262
return tf.reshape(x_ref, (batch_size, -1))
6363

@@ -79,3 +79,4 @@ def givens_rotations(r, x):
7979
x_rot = givens[:, :, 0:1] * x + givens[:, :, 1:] * tf.concat(
8080
(-x[:, :, 1:], x[:, :, 0:1]), axis=-1)
8181
return tf.reshape(x_rot, (batch_size, -1))
82+

0 commit comments

Comments
 (0)