class_docstr: Orthogonal Relation Transforms with Graph Context Modeling for Knowledge Graph Embedding.
  https://aclanthology.org/2020.acl-main.241/
class_docstr_tok: ["Orthogonal","Relation","Transforms","with","Graph","Context","Modeling","for","Knowledge","Graph","Embedding",".","https",":","\/\/aclanthology.org\/2020.acl-main.241\/"]
docstr: Transpose the orthogonalized relation embeddings.
          
docstr_tok: ["Transpose","the","orthogonalized","relation","embeddings","."]
code: def _orth_reverse_mat(self, embeds):
      """Transpose the orthogonalized relation embeddings."""
      embed_shape = embeds.shape
      if self.use_scale:
          embeds = embeds.reshape(
              [-1, self.num_elem, self.num_elem + 1]
          )
          rel_mat = embeds[:, :, : self.num_elem].transpose([0, 2, 1])
          rel_scale = self.reverse_scale(embeds[:, :, self.num_elem :])
          embeds = paddle.concat([rel_mat, rel_scale], axis=-1).reshape(
              embed_shape
          )
      else:
          embeds = embeds.reshape([-1, self.num_elem, self.num_elem])
          embeds = embeds.transpose([0, 2, 1]).reshape(embed_shape)
      return embeds
  
imports: import math
  import numpy
  from numpy.random import RandomState
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.functional import log_sigmoid
label_desc: Use image node_id 12 for calling the OTEScore obj's underlying member method code with example usage: obj._orth_reverse_mat(embeds) and returns: embeds