def convert_svhn(which_format, directory, output_directory,
                 output_filename=None):
    if which_format not in (1, 2):
        raise ValueError("SVHN format needs to be either 1 or 2.")
    if not output_filename:
        output_filename = 'svhn_format_{}.hdf5'.format(which_format)
    if which_format == 1:
        return convert_svhn_format_1(
            directory, output_directory, output_filename)
    else:
        return convert_svhn_format_2(
            directory, output_directory, output_filename)
Converts the SVHN dataset to HDF5.
dataset/ETHPy150Open mila-udem/fuel/fuel/converters/svhn.py/convert_svhn