Beispiel #1
0
    def _run_and_report_benchmark(self):
        start_time_sec = time.time()
        stats = keras_cifar_main.run(FLAGS)
        wall_time_sec = time.time() - start_time_sec

        super(Resnet56KerasBenchmarkBase,
              self)._report_benchmark(stats,
                                      wall_time_sec,
                                      total_batch_size=FLAGS.batch_size,
                                      log_steps=FLAGS.log_steps)
  def _run_and_report_benchmark(self):
    start_time_sec = time.time()
    stats = keras_cifar_main.run(FLAGS)
    wall_time_sec = time.time() - start_time_sec

    super(Resnet56KerasBenchmarkBase, self)._report_benchmark(
        stats,
        wall_time_sec,
        total_batch_size=FLAGS.batch_size,
        log_steps=FLAGS.log_steps)
 def keras_resnet56_1_gpu(self):
     """Test keras based model with Keras fit and distribution strategies."""
     self._setup()
     flags.FLAGS.num_gpus = 1
     flags.FLAGS.data_dir = DATA_DIR
     flags.FLAGS.batch_size = 128
     flags.FLAGS.train_epochs = 182
     flags.FLAGS.model_dir = self._get_model_dir('keras_resnet56_1_gpu')
     flags.FLAGS.dtype = 'fp32'
     stats = keras_cifar_main.run(flags.FLAGS)
     self._fill_report_object(stats)
Beispiel #4
0
 def benchmark_graph_2_gpu(self):
   """Test keras based model with Keras fit and distribution strategies."""
   self._setup()
   FLAGS.num_gpus = 2
   FLAGS.data_dir = DATA_DIR
   FLAGS.batch_size = 128
   FLAGS.train_epochs = 182
   FLAGS.model_dir = self._get_model_dir('keras_resnet56_2_gpu')
   FLAGS.dtype = 'fp32'
   stats = keras_cifar_main.run(FLAGS)
   self.fill_report_object(stats, FLAGS.batch_size)
Beispiel #5
0
 def benchmark_1_gpu(self):
   """Test keras based model with eager and distribution strategies."""
   self._setup()
   FLAGS.num_gpus = 1
   FLAGS.data_dir = DATA_DIR
   FLAGS.batch_size = 128
   FLAGS.train_epochs = 182
   FLAGS.model_dir = self._get_model_dir('keras_resnet56_eager_1_gpu')
   FLAGS.dtype = 'fp32'
   FLAGS.enable_eager = True
   stats = keras_cifar_main.run(flags.FLAGS)
   self.fill_report_object(stats, FLAGS.batch_size)
Beispiel #6
0
    def _run_and_report_benchmark(self):
        start_time_sec = time.time()
        stats = keras_cifar_main.run(FLAGS)
        wall_time_sec = time.time() - start_time_sec

        super(Resnet56KerasAccuracy,
              self)._report_benchmark(stats,
                                      wall_time_sec,
                                      top_1_min=MIN_TOP_1_ACCURACY,
                                      top_1_max=MAX_TOP_1_ACCURACY,
                                      total_batch_size=FLAGS.batch_size,
                                      log_steps=100)
  def _run_and_report_benchmark(self):
    start_time_sec = time.time()
    stats = keras_cifar_main.run(FLAGS)
    wall_time_sec = time.time() - start_time_sec

    super(Resnet56KerasAccuracy, self)._report_benchmark(
        stats,
        wall_time_sec,
        top_1_min=MIN_TOP_1_ACCURACY,
        top_1_max=MAX_TOP_1_ACCURACY,
        total_batch_size=FLAGS.batch_size,
        log_steps=100)
Beispiel #8
0
 def _run_benchmark(self):
   stats = keras_cifar_main.run(FLAGS)
   self.fill_report_object(stats)