(episodes_dir_list,
                                                train_suffix=utils.TRAIN_SUFFIX,
                                                test_suffix=utils.TEST_SUFFIX)
return tf.data.experimental.sample_from_datasets(
      dataset_per_dir), num_files_per_dir
This function reads episodes from a list of episode directories.

  Additionally it returns list of total number of episodes available in per
  directory in one epoch.

  Args:
    episodes_dir_list: list, list of directories that have tf_record files.
    train_suffix: str, used during dumping of episodes to indicate training
      records. Default value should be kept unless the default is overwritten
      during creation of these episodes.
    test_suffix: str, used during dumping of episodes to indicate test records.
      Default value should be kept unless the default is overwritten during
      creation of these episodes.

  Returns:
    tf.data.Dataset, that returns a tuple of training and test datasets. These
    tuples are randomly chosen from one of the directories in episode_dir_list
    with uniform probability. Each dataset has `image` and `label` fields.
    list(int), number of episodes read in each directory.
  Raises:
    RuntimeError: when some episodes are missing.
This function reads episodes from a list of episode directories.
This function reads episodes from a list of episode directories .
def read_episodes_from_records_multiple_sources(episodes_dir_list,
                                                train_suffix=utils.TRAIN_SUFFIX,
                                                test_suffix=utils.TEST_SUFFIX):
  """This function reads episodes from a list of episode directories.

  Additionally it returns list of total number of episodes available in per
  directory in one epoch.

  Args:
    episodes_dir_list: list, list of directories that have tf_record files.
    train_suffix: str, used during dumping of episodes to indicate training
      records. Default value should be kept unless the default is overwritten
      during creation of these episodes.
    test_suffix: str, used during dumping of episodes to indicate test records.
      Default value should be kept unless the default is overwritten during
      creation of these episodes.

  Returns:
    tf.data.Dataset, that returns a tuple of training and test datasets. These
    tuples are randomly chosen from one of the directories in episode_dir_list
    with uniform probability. Each dataset has `image` and `label` fields.
    list(int), number of episodes read in each directory.
  Raises:
    RuntimeError: when some episodes are missing.
  """

  num_files_per_dir = []
  dataset_per_dir = []
  for episode_dir in episodes_dir_list:
    episode_dataset, episode_num_files = read_episodes_from_records(
        episode_dir, train_suffix, test_suffix)
    num_files_per_dir.append(episode_num_files)
    dataset_per_dir.append(episode_dataset)
  return tf.data.experimental.sample_from_datasets(
      dataset_per_dir), num_files_per_dir
def read_episodes_from_records_multiple_sources ( episodes_dir_list , train_suffix = utils . TRAIN_SUFFIX , test_suffix = utils . TEST_SUFFIX ) : num_files_per_dir = [ ] dataset_per_dir = [ ] for episode_dir in episodes_dir_list : episode_dataset , episode_num_files = read_episodes_from_records ( episode_dir , train_suffix , test_suffix ) num_files_per_dir . append ( episode_num_files ) dataset_per_dir . append ( episode_dataset ) return tf . data . experimental . sample_from_datasets ( dataset_per_dir ) , num_files_per_dir