(ways, logits, targets)
return way_to_accuracy
Accuracy as a function of the episode's way.

  Args:
    ways: A list containing the 'way' of each episode.
    logits: A list containing a np.array per episode. The shape of an episode's
      array is [size of test set, way].
    targets: A list containing a np.array per episode. The shape of an episode's
      array is [size of test set]. This contains integers in the range from 0 to
      the way of the episode.

  Returns:
    way_to_accuracy: A dict that maps each 'observed' way to a list that
      stores the accuracy obtained for different episodes of that way.
Accuracy as a function of the episode's way.
Accuracy as a function of the episode s way .
def get_way_to_accuracy(ways, logits, targets):
  """Accuracy as a function of the episode's way.

  Args:
    ways: A list containing the 'way' of each episode.
    logits: A list containing a np.array per episode. The shape of an episode's
      array is [size of test set, way].
    targets: A list containing a np.array per episode. The shape of an episode's
      array is [size of test set]. This contains integers in the range from 0 to
      the way of the episode.

  Returns:
    way_to_accuracy: A dict that maps each 'observed' way to a list that
      stores the accuracy obtained for different episodes of that way.
  """
  way_to_accuracy = collections.defaultdict(list)
  for episode_num, episode_way in enumerate(ways):
    episode_logits = logits[episode_num]
    assert episode_way == episode_logits.shape[1]
    episode_targets = targets[episode_num]
    episode_acc = compute_episode_accuracy(episode_logits, episode_targets)
    way_to_accuracy[episode_way].append(episode_acc)
  return way_to_accuracy
def get_way_to_accuracy ( ways , logits , targets ) : way_to_accuracy = collections . defaultdict ( list ) for episode_num , episode_way in enumerate ( ways ) : episode_logits = logits [ episode_num ] assert episode_way == episode_logits . shape [ 1 ] episode_targets = targets [ episode_num ] episode_acc = compute_episode_accuracy ( episode_logits , episode_targets ) way_to_accuracy [ episode_way ] . append ( episode_acc ) return way_to_accuracy