in supervised_reptile/omniglot.py [0:0]
def read_dataset(data_dir):
"""
Iterate over the characters in a data directory.
Args:
data_dir: a directory of alphabet directories.
Returns:
An iterable over Characters.
The dataset is unaugmented and not split up into
training and test sets.
"""
for alphabet_name in sorted(os.listdir(data_dir)):
alphabet_dir = os.path.join(data_dir, alphabet_name)
if not os.path.isdir(alphabet_dir):
continue
for char_name in sorted(os.listdir(alphabet_dir)):
if not char_name.startswith('character'):
continue
yield Character(os.path.join(alphabet_dir, char_name), 0)