class_docstr: Trainer for an agreement model that always predicts the correct value.
class_docstr_tok: ["Trainer","for","an","agreement","model","that","always","predicts","the","correct","value","."]
docstr: Creates the agreement prediction TensorFlow subgraph.
  
  This function is the equivalent of `create_agreement_prediction` in
  TrainerAgreement, but here we use the oracle labels to make the agreement
  prediction.
  
  Args:
    src_indices: A Tensor or Placeholder of shape (batch_size,) containing the
      indices of the samples that are the sources of the edges.
    tgt_indices: A Tensor or Placeholder of shape (batch_size,) containing the
      indices of the samples that are the targets of the edges.
    unused_kwargs: Other unused keyword arguments, which we allow in order to
      create a common interface with TrainerAgreement.
  
  Returns:
    predictions: None, because this model doesn't do logits computations, but
      we still return something in order to keep the same function outputs as
      TrainerAgreement.
    normalized_predictions: A Tensor of shape (batch_size,) with values in
      {0, 1}, containing the agreement prediction probabilities.
    variables: An empty dictionary of trainable variables, because this model
      does not have any trainable variables.
    reg_params: An empty dictionary of variables that are used in the
      regularization weight decay term, because this model doesn't have
      regularization variables.
code: def create_agreement_prediction(
      self, src_indices, tgt_indices, **unused_kwargs
  ):
      """Creates the agreement prediction TensorFlow subgraph.
  
      This function is the equivalent of `create_agreement_prediction` in
      TrainerAgreement, but here we use the oracle labels to make the agreement
      prediction.
  
      Args:
        src_indices: A Tensor or Placeholder of shape (batch_size,) containing the
          indices of the samples that are the sources of the edges.
        tgt_indices: A Tensor or Placeholder of shape (batch_size,) containing the
          indices of the samples that are the targets of the edges.
        unused_kwargs: Other unused keyword arguments, which we allow in order to
          create a common interface with TrainerAgreement.
  
      Returns:
        predictions: None, because this model doesn't do logits computations, but
          we still return something in order to keep the same function outputs as
          TrainerAgreement.
        normalized_predictions: A Tensor of shape (batch_size,) with values in
          {0, 1}, containing the agreement prediction probabilities.
        variables: An empty dictionary of trainable variables, because this model
          does not have any trainable variables.
        reg_params: An empty dictionary of variables that are used in the
          regularization weight decay term, because this model doesn't have
          regularization variables.
      """
      with tf.variable_scope(
          self.original_var_scope,
          auxiliary_name_scope=False,
          reuse=True,
      ):
          src_labels = tf.gather(self.labels, src_indices)
          tgt_labels = tf.gather(self.labels, tgt_indices)
          agreement = tf.equal(src_labels, tgt_labels)
      return None, tf.cast(agreement, tf.float32), {}, {}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import logging
  import os
  from ..data.preprocessing import split_train_val
  import numpy
  import tensorflow
  from .trainer_base import batch_iterator
  from .trainer_base import Trainer
label_desc: Use image node_id 4 for calling the TrainerPerfectAgreement obj's underlying member method code with example usage: obj.create_agreement_prediction(src_indices, tgt_indices) and returns: None,  tf,  dict,  dict