(num_ways, rel_classes, rng=None)
return rng.choice(rel_classes, num_ways, replace=False)
Samples the (relative) class IDs for the episode.

  Args:
    num_ways: int, number of ways for the episode.
    rel_classes: list of int, available class IDs to sample from.
    rng: np.random.RandomState used for sampling.

  Returns:
    class_ids: np.array, class IDs for the episode, with values in rel_classes.
Samples the (relative) class IDs for the episode.
Samples the ( relative ) class IDs for the episode .
def sample_class_ids_uniformly(num_ways, rel_classes, rng=None):
  """Samples the (relative) class IDs for the episode.

  Args:
    num_ways: int, number of ways for the episode.
    rel_classes: list of int, available class IDs to sample from.
    rng: np.random.RandomState used for sampling.

  Returns:
    class_ids: np.array, class IDs for the episode, with values in rel_classes.
  """
  rng = rng or RNG
  return rng.choice(rel_classes, num_ways, replace=False)
def sample_class_ids_uniformly ( num_ways , rel_classes , rng = None ) : rng = rng or RNG return rng . choice ( rel_classes , num_ways , replace = False )