class_docstr: KG embedding trainer object.
docstr: Computes validation loss.
  
  Args:
    model: tf.keras.Model KG embedding model.
    examples: tf.data.Dataset containing KG validation triples.
  
  Returns:
    Average validation loss.
docstr_tok: ["Computes","validation","loss",".","Args",":","model",":","tf.keras.Model","KG","embedding","model",".","examples",":","tf.data.Dataset","containing","KG","validation","triples",".","Returns",":","Average","validation","loss","."]
code: def valid_step(self, model, examples):
      """Computes validation loss.
  
      Args:
        model: tf.keras.Model KG embedding model.
        examples: tf.data.Dataset containing KG validation triples.
  
      Returns:
        Average validation loss.
      """
      total_loss = tf.keras.backend.constant(0.0)
      counter = tf.keras.backend.constant(0.0)
      for input_batch in examples:
          counter += 1.0
          total_loss += self.loss_fn.calculate_loss(model, input_batch)
      return total_loss / counter
  
file_path: neural-structured-learning/research/kg_hyp_emb/learning/trainer.py
imports: from kg_hyp_emb.learning import losses
  import tensorflow
label_desc: Use image node_id 3 for calling the KGTrainer obj's underlying member method code with example usage: obj.valid_step(model, examples) and returns: unknown