parameters: (make_model, hparams, joint_safe=False)
docstring: Evaluate a model with sigmoid loss.
  
    Args:
      make_model: Function returning `(logits, labels)`, where logits
        is a 1-D tensor of logits and labels is a 1-D tensor of bools.
      hparams: Hyperparameters.
      joint_safe: Whether the examples are pairs of true, false.
  
    Raises:
      ValueError: If flags are missing or invalid.
docstring_summary: Evaluate a model with sigmoid loss.
docstring_tokens: Evaluate a model with sigmoid loss .
function: def sigmoid_eval(make_model, hparams, joint_safe=False):
    """Evaluate a model with sigmoid loss.
  
    Args:
      make_model: Function returning `(logits, labels)`, where logits
        is a 1-D tensor of logits and labels is a 1-D tensor of bools.
      hparams: Hyperparameters.
      joint_safe: Whether the examples are pairs of true, false.
  
    Raises:
      ValueError: If flags are missing or invalid.
    """
    def make_metrics():
      """Builds a model and computes metrics."""
      # Generate model
      logits, labels = make_model()
      if joint_safe:
        joint_logits, joint_labels = model_utils.paired_joint_logits_and_labels(
            logits, labels)
  
      # Measure accuracy
      metric_ops = [metrics.streaming_accuracy(logits > 0, labels)]
      tf.contrib.deprecated.scalar_summary('eval accuracy', metric_ops[-1][0])
  
      # Measure joint accuracy
      if joint_safe:
        metric_ops.append(metrics.streaming_accuracy(joint_logits > 0,
                                                     joint_labels))
        tf.contrib.deprecated.scalar_summary('eval joint accuracy',
                                             metric_ops[-1][0])
      return metric_ops
  
    general_eval(make_metrics, hparams)
function_tokens: def sigmoid_eval ( make_model , hparams , joint_safe = False ) : def make_metrics ( ) : """Builds a model and computes metrics.""" # Generate model logits , labels = make_model ( ) if joint_safe : joint_logits , joint_labels = model_utils . paired_joint_logits_and_labels ( logits , labels ) # Measure accuracy metric_ops = [ metrics . streaming_accuracy ( logits > 0 , labels ) ] tf . contrib . deprecated . scalar_summary ( 'eval accuracy' , metric_ops [ - 1 ] [ 0 ] ) # Measure joint accuracy if joint_safe : metric_ops . append ( metrics . streaming_accuracy ( joint_logits > 0 , joint_labels ) ) tf . contrib . deprecated . scalar_summary ( 'eval joint accuracy' , metric_ops [ - 1 ] [ 0 ] ) return metric_ops general_eval ( make_metrics , hparams )