(flags=FLAGS)
return {
      # Datasets in the same order as reported in the article.
      'ilsvrc_2012': (dataset_to_records.ImageNetConverter,
                      ConverterArgs(
                          data_root=flags.ilsvrc_2012_data_root,
                          long_name='ImageNet ILSVRC-2012')),
      'ilsvrc_2012_v2': (dataset_to_records.ImageNetConverterV2,
                         ConverterArgs(
                             data_root=flags.ilsvrc_2012_data_root,
                             long_name='ImageNet ILSVRC-2012-V2')),
      'omniglot': (dataset_to_records.OmniglotConverter,
                   ConverterArgs(
                       data_root=flags.omniglot_data_root,
                       long_name='Omniglot')),
      'aircraft': (dataset_to_records.AircraftConverter,
                   ConverterArgs(
                       data_root=flags.aircraft_data_root,
                       long_name='FGVC-Aircraft Benchmark')),
      'cu_birds': (dataset_to_records.CUBirdsConverter,
                   ConverterArgs(
                       data_root=flags.cu_birds_data_root,
                       long_name='CU Birds')),
      'dtd': (dataset_to_records.DTDConverter,
              ConverterArgs(
                  data_root=flags.dtd_data_root,
                  long_name='Describable Textures Dataset')),
      'quickdraw': (dataset_to_records.QuickdrawConverter,
                    ConverterArgs(
                        data_root=flags.quickdraw_data_root,
                        long_name='Quick, Draw!')),
      'fungi': (dataset_to_records.FungiConverter,
                ConverterArgs(
                    data_root=flags.fungi_data_root,
                    long_name='fungi 2018 FGVCx')),
      'vgg_flower': (dataset_to_records.VGGFlowerConverter,
                     ConverterArgs(
                         data_root=flags.vgg_flower_data_root,
                         long_name='VGG Flower')),
      'traffic_sign': (dataset_to_records.TrafficSignConverter,
                       ConverterArgs(
                           data_root=flags.traffic_sign_data_root,
                           long_name='Traffic Sign')),
      'mscoco':
          (dataset_to_records.MSCOCOConverter,
           ConverterArgs(data_root=flags.mscoco_data_root, long_name='MSCOCO')),
      # Diagnostics-only dataset
      'mini_imagenet': (dataset_to_records.MiniImageNetConverter,
                        ConverterArgs(
                            data_root=flags.mini_imagenet_data_root,
                            long_name='MiniImageNet')),
  }
Returns a dict mapping dataset name to (converter class, arguments).

  This (converter class, arguments) pair will be used to build the corresponding
  DatasetConverter object.

  Args:
    flags: A tf.flags.FlagValues object, by default tf.flags.FLAGS, containing
      the data_root of the datasets.
Returns a dict mapping dataset name to (converter class, arguments).
Returns a dict mapping dataset name to ( converter class arguments ) .
def _dataset_name_to_converter_and_args(flags=FLAGS):
  """Returns a dict mapping dataset name to (converter class, arguments).

  This (converter class, arguments) pair will be used to build the corresponding
  DatasetConverter object.

  Args:
    flags: A tf.flags.FlagValues object, by default tf.flags.FLAGS, containing
      the data_root of the datasets.
  """
  # The dictionary is built inside a function, rather than at the module
  # top-level, because the FLAGS are not available at import time.
  return {
      # Datasets in the same order as reported in the article.
      'ilsvrc_2012': (dataset_to_records.ImageNetConverter,
                      ConverterArgs(
                          data_root=flags.ilsvrc_2012_data_root,
                          long_name='ImageNet ILSVRC-2012')),
      'ilsvrc_2012_v2': (dataset_to_records.ImageNetConverterV2,
                         ConverterArgs(
                             data_root=flags.ilsvrc_2012_data_root,
                             long_name='ImageNet ILSVRC-2012-V2')),
      'omniglot': (dataset_to_records.OmniglotConverter,
                   ConverterArgs(
                       data_root=flags.omniglot_data_root,
                       long_name='Omniglot')),
      'aircraft': (dataset_to_records.AircraftConverter,
                   ConverterArgs(
                       data_root=flags.aircraft_data_root,
                       long_name='FGVC-Aircraft Benchmark')),
      'cu_birds': (dataset_to_records.CUBirdsConverter,
                   ConverterArgs(
                       data_root=flags.cu_birds_data_root,
                       long_name='CU Birds')),
      'dtd': (dataset_to_records.DTDConverter,
              ConverterArgs(
                  data_root=flags.dtd_data_root,
                  long_name='Describable Textures Dataset')),
      'quickdraw': (dataset_to_records.QuickdrawConverter,
                    ConverterArgs(
                        data_root=flags.quickdraw_data_root,
                        long_name='Quick, Draw!')),
      'fungi': (dataset_to_records.FungiConverter,
                ConverterArgs(
                    data_root=flags.fungi_data_root,
                    long_name='fungi 2018 FGVCx')),
      'vgg_flower': (dataset_to_records.VGGFlowerConverter,
                     ConverterArgs(
                         data_root=flags.vgg_flower_data_root,
                         long_name='VGG Flower')),
      'traffic_sign': (dataset_to_records.TrafficSignConverter,
                       ConverterArgs(
                           data_root=flags.traffic_sign_data_root,
                           long_name='Traffic Sign')),
      'mscoco':
          (dataset_to_records.MSCOCOConverter,
           ConverterArgs(data_root=flags.mscoco_data_root, long_name='MSCOCO')),
      # Diagnostics-only dataset
      'mini_imagenet': (dataset_to_records.MiniImageNetConverter,
                        ConverterArgs(
                            data_root=flags.mini_imagenet_data_root,
                            long_name='MiniImageNet')),
  }
def _dataset_name_to_converter_and_args ( flags = FLAGS ) : # The dictionary is built inside a function, rather than at the module # top-level, because the FLAGS are not available at import time. return { # Datasets in the same order as reported in the article. 'ilsvrc_2012' : ( dataset_to_records . ImageNetConverter , ConverterArgs ( data_root = flags . ilsvrc_2012_data_root , long_name = 'ImageNet ILSVRC-2012' ) ) , 'ilsvrc_2012_v2' : ( dataset_to_records . ImageNetConverterV2 , ConverterArgs ( data_root = flags . ilsvrc_2012_data_root , long_name = 'ImageNet ILSVRC-2012-V2' ) ) , 'omniglot' : ( dataset_to_records . OmniglotConverter , ConverterArgs ( data_root = flags . omniglot_data_root , long_name = 'Omniglot' ) ) , 'aircraft' : ( dataset_to_records . AircraftConverter , ConverterArgs ( data_root = flags . aircraft_data_root , long_name = 'FGVC-Aircraft Benchmark' ) ) , 'cu_birds' : ( dataset_to_records . CUBirdsConverter , ConverterArgs ( data_root = flags . cu_birds_data_root , long_name = 'CU Birds' ) ) , 'dtd' : ( dataset_to_records . DTDConverter , ConverterArgs ( data_root = flags . dtd_data_root , long_name = 'Describable Textures Dataset' ) ) , 'quickdraw' : ( dataset_to_records . QuickdrawConverter , ConverterArgs ( data_root = flags . quickdraw_data_root , long_name = 'Quick, Draw!' ) ) , 'fungi' : ( dataset_to_records . FungiConverter , ConverterArgs ( data_root = flags . fungi_data_root , long_name = 'fungi 2018 FGVCx' ) ) , 'vgg_flower' : ( dataset_to_records . VGGFlowerConverter , ConverterArgs ( data_root = flags . vgg_flower_data_root , long_name = 'VGG Flower' ) ) , 'traffic_sign' : ( dataset_to_records . TrafficSignConverter , ConverterArgs ( data_root = flags . traffic_sign_data_root , long_name = 'Traffic Sign' ) ) , 'mscoco' : ( dataset_to_records . MSCOCOConverter , ConverterArgs ( data_root = flags . mscoco_data_root , long_name = 'MSCOCO' ) ) , # Diagnostics-only dataset 'mini_imagenet' : ( dataset_to_records . MiniImageNetConverter , ConverterArgs ( data_root = flags . mini_imagenet_data_root , long_name = 'MiniImageNet' ) ) , }