(logits, targets)
return np.mean(np.equal(preds, targets))
Computes the accuracy for the episode.

  The accuracy for the episode is the proportion of correctly classified test
  examples from the overall number of test examples.

  Args:
    logits: A float array, of shape [num_test_examples, num_classes].
    targets: An int array, of the same shape as logits.

  Returns:
    accuracy: A float. The precision for the given class.
Computes the accuracy for the episode.
Computes the accuracy for the episode .
def compute_episode_accuracy(logits, targets):
  """Computes the accuracy for the episode.

  The accuracy for the episode is the proportion of correctly classified test
  examples from the overall number of test examples.

  Args:
    logits: A float array, of shape [num_test_examples, num_classes].
    targets: An int array, of the same shape as logits.

  Returns:
    accuracy: A float. The precision for the given class.
  """
  preds = np.argmax(logits, axis=1)
  return np.mean(np.equal(preds, targets))
def compute_episode_accuracy ( logits , targets ) : preds = np . argmax ( logits , axis = 1 ) return np . mean ( np . equal ( preds , targets ) )