class_docstr: Abstract loss function for KG embeddings.
docstr: Computes KG loss.
  
  Args:
    logits: Tensor of size batch_size x n_entities containing predictions.
    full_labels: Tensor of size batch_size x n_entities containing one-hot
      labels.
    labels: Tensor of size batch_size x 1 containing sparse labels (index of
      correct tail entity).
  
  Returns:
    Average loss within batch.
docstr_tok: ["Computes","KG","loss",".","Args",":","logits",":","Tensor","of","size","batch_size","x","n_entities","containing","predictions",".","full_labels",":","Tensor","of","size","batch_size","x","n_entities","containing","one-hot","labels",".","labels",":","Tensor","of","size","batch_size","x","1","containing","sparse","labels","(","index","of","correct","tail","entity",")",".","Returns",":","Average","loss","within","batch","."]
code: def loss_from_logits(self, logits, full_labels, labels):
      """Computes KG loss.
  
      Args:
        logits: Tensor of size batch_size x n_entities containing predictions.
        full_labels: Tensor of size batch_size x n_entities containing one-hot
          labels.
        labels: Tensor of size batch_size x 1 containing sparse labels (index of
          correct tail entity).
  
      Returns:
        Average loss within batch.
      """
      pass
  
file_path: neural-structured-learning/research/kg_hyp_emb/learning/losses.py
imports: import abc
  import tensorflow
label_desc: Use image node_id 2 for calling the LossFn obj's underlying member method code with example usage: obj.loss_from_logits(logits, full_labels, labels) without return types