class_docstr: Hyperbolic attention model that combines reflections and rotations.
class_docstr_tok: ["Hyperbolic","attention","model","that","combines","reflections","and","rotations","."]
code: def get_queries(self, input_tensor):
      c = tf.math.softplus(self.c)
      entity = self.entity(input_tensor[:, 0])
  
      # candidates
      rot = self.rot(input_tensor[:, 1])
      ref = self.ref(input_tensor[:, 1])
      ref_q = self.get_reflection_queries(entity, ref)
      rot_q = self.get_rotation_queries(entity, rot)
      cands = tf.concat([ref_q, rot_q], axis=1)
  
      # self-attention mechanism
      context_vec = self.context_vec(input_tensor[:, 1])
      context_vec = tf.reshape(context_vec, (-1, 1, self.rank))
      att_weights = tf.reduce_sum(
          context_vec * cands * self.scale, axis=-1, keepdims=True
      )
      att_weights = tf.nn.softmax(att_weights, axis=-1)
      att_q = tf.reduce_sum(att_weights * cands, axis=1)
      lhs = hyp_utils.expmap0(att_q, c)
  
      # hyperbolic translation
      rel = hyp_utils.expmap0(self.rel(input_tensor[:, 1]), c)
      return hyp_utils.mobius_add(lhs, rel, c)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from kg_hyp_emb.models.base import KGModel
  from kg_hyp_emb.utils import euclidean
  from kg_hyp_emb.utils import hyperbolic
  import numpy
  import tensorflow
label_desc: Use image node_id 4 for calling the AttH obj's underlying member method code with example usage: obj.get_queries(input_tensor) and returns: hyp_utils