當前位置: 首頁>>代碼示例>>Python>>正文


Python download_and_convert_mnist.run方法代碼示例

本文整理匯總了Python中datasets.download_and_convert_mnist.run方法的典型用法代碼示例。如果您正苦於以下問題:Python download_and_convert_mnist.run方法的具體用法?Python download_and_convert_mnist.run怎麽用?Python download_and_convert_mnist.run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在datasets.download_and_convert_mnist的用法示例。


在下文中一共展示了download_and_convert_mnist.run方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'wikiart':
    if not FLAGS.input_dataset_dir is None:
      convert_wikiart.run(FLAGS.input_dataset_dir, FLAGS.dataset_dir)

    else:
      raise ValueError("For wikiart, you must supply a valid input directory with --input_dataset_dir")
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_name) 
開發者ID:mlberkeley,項目名稱:Creative-Adversarial-Networks,代碼行數:23,代碼來源:download_and_convert_data.py

示例2: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'cifar10':
    if FLAGS.shard:
      download_convert_and_shard_cifar10.run(FLAGS.dataset_dir)
    else:
      download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_dir) 
開發者ID:wenwei202,項目名稱:terngrad,代碼行數:20,代碼來源:download_and_convert_data.py

示例3: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'fer':
    download_and_convert_fer.run(FLAGS.dataset_dir,FLAGS.pic_path)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_name) 
開發者ID:ucloud,項目名稱:uai-sdk,代碼行數:19,代碼來源:download_and_convert_data.py

示例4: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'diabetic':
      download_and_convert_diabetic.run(FLAGS.dataset_dir)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_name) 
開發者ID:PacktPublishing,項目名稱:Machine-Learning-with-TensorFlow-1.x,代碼行數:19,代碼來源:download_and_convert_data.py

示例5: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'customized':
    convert_customized.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_name) 
開發者ID:yeephycho,項目名稱:nasnet-tensorflow,代碼行數:19,代碼來源:convert_customized_data.py

示例6: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'visualwakewords':
    download_and_convert_visualwakewords.run(
        FLAGS.dataset_dir, FLAGS.small_object_area_threshold,
        FLAGS.foreground_class_of_interest)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_name) 
開發者ID:tensorflow,項目名稱:models,代碼行數:21,代碼來源:download_and_convert_data.py

示例7: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_name) 
開發者ID:ringringyi,項目名稱:DOTA_models,代碼行數:17,代碼來源:download_and_convert_data.py

示例8: main

# 需要導入模塊: from datasets import download_and_convert_mnist [as 別名]
# 或者: from datasets.download_and_convert_mnist import run [as 別名]
def main(_):
  if not FLAGS.dataset_name:
    raise ValueError('You must supply the dataset name with --dataset_name')
  if not FLAGS.dataset_dir:
    raise ValueError('You must supply the dataset directory with --dataset_dir')

  if FLAGS.dataset_name == 'cifar10':
    download_and_convert_cifar10.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'flowers':
    download_and_convert_flowers.run(FLAGS.dataset_dir)
  elif FLAGS.dataset_name == 'mnist':
    download_and_convert_mnist.run(FLAGS.dataset_dir)
  else:
    raise ValueError(
        'dataset_name [%s] was not recognized.' % FLAGS.dataset_dir) 
開發者ID:logicalclocks,項目名稱:hops-tensorflow,代碼行數:17,代碼來源:download_and_convert_data.py


注:本文中的datasets.download_and_convert_mnist.run方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。