Using fix curvature with the RetH, RotH, and AttH
davendw49 opened this issue · 1 comments
Your work of Knowledge embedding in hyperbolic space inspires me a lot, and I am undergoing reproducing your code and found some issues.
First, Hyperbolic distance on the Poincare ball, utils.hyperbolic.hyp_distance
isn't used, which I think the fixed curvature is calculated from here.
Second, I found that if args.multi_c
is set to be false, CUDA error: device-side assert triggered occurs during the training of hyperbolic models, since the size of the c_init
cause the out of index
, because the number of relation types is greater than 1.
if self.multi_c:
c_init = torch.ones((self.sizes[1], 1), dtype=self.data_type)
else:
c_init = torch.ones((1, 1), dtype=self.data_type)
self.c = nn.Parameter(c_init, requires_grad=False)
I am trying to follow your work to find more usage of hyperbolic models in knowledge embedding. Hope to have your reply soon!
Sincerely.
Daven
The self.sizes
is wrong I think, I can run the code successfully.