class_docstr: Abstract Knowledge Graph embedding model class.
  
  Module to define basic operations in KG embedding models, including embedding
  initialization, computing embeddings and triples' scores.
class_docstr_tok: ["Abstract","Knowledge","Graph","embedding","model","class",".","Module","to","define","basic","operations","in","KG","embedding","models",",","including","embedding","initialization",",","computing","embeddings","and","triples","'","scores","."]
docstr: Computes a similarity score between queries and tail embeddings.
  
  Args:
    lhs: Tensor of size B1 x embedding_dimension containing queries'
      embeddings.
    rhs: Tensor of size B2 x embedding_dimension containing tail entities'
      embeddings.
    eval_mode: boolean to indicate whether to compute all pairs of scores or
      not. If False, B1 must be equal to B2.
  
  Returns:
    Tensor representing similarity scores. If eval_mode is False, this tensor
    has size B1 x 1, otherwise it has size B1 x B2.
docstr_tok: ["Computes","a","similarity","score","between","queries","and","tail","embeddings",".","Args",":","lhs",":","Tensor","of","size","B1","x","embedding_dimension","containing","queries'","embeddings",".","rhs",":","Tensor","of","size","B2","x","embedding_dimension","containing","tail","entities'","embeddings",".","eval_mode",":","boolean","to","indicate","whether","to","compute","all","pairs","of","scores","or","not",".","If","False",",","B1","must","be","equal","to","B2",".","Returns",":","Tensor","representing","similarity","scores",".","If","eval_mode","is","False",",","this","tensor","has","size","B1","x","1",",","otherwise","it","has","size","B1","x","B2","."]
code: def similarity_score(self, lhs, rhs, eval_mode):
      """Computes a similarity score between queries and tail embeddings.
  
      Args:
        lhs: Tensor of size B1 x embedding_dimension containing queries'
          embeddings.
        rhs: Tensor of size B2 x embedding_dimension containing tail entities'
          embeddings.
        eval_mode: boolean to indicate whether to compute all pairs of scores or
          not. If False, B1 must be equal to B2.
  
      Returns:
        Tensor representing similarity scores. If eval_mode is False, this tensor
        has size B1 x 1, otherwise it has size B1 x B2.
      """
      pass
  
file_path: neural-structured-learning/research/kg_hyp_emb/models/base.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from kg_hyp_emb.learning import regularizers
  import numpy
  import tensorflow
label_desc: Use image node_id 5 for calling the KGModel obj's underlying member method code with example usage: obj.similarity_score(lhs, rhs, eval_mode) without return types