keras_cifar_benchmark.py 16.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
Toby Boyd's avatar
Toby Boyd committed
15
"""Executes Keras benchmarks and accuracy tests."""
Shining Sun's avatar
Shining Sun committed
16
17
from __future__ import absolute_import
from __future__ import division
Toby Boyd's avatar
Toby Boyd committed
18
19
from __future__ import print_function

20
import os
21
import time
Toby Boyd's avatar
Toby Boyd committed
22
from absl import flags
23
import tensorflow as tf  # pylint: disable=g-bad-import-order
Toby Boyd's avatar
Toby Boyd committed
24

Toby Boyd's avatar
Toby Boyd committed
25
from official.resnet.keras import keras_benchmark
26
27
from official.resnet.keras import keras_cifar_main

28
MIN_TOP_1_ACCURACY = 0.929
29
MAX_TOP_1_ACCURACY = 0.938
Toby Boyd's avatar
Toby Boyd committed
30

Toby Boyd's avatar
Toby Boyd committed
31
FLAGS = flags.FLAGS
32
CIFAR_DATA_DIR_NAME = 'cifar-10-batches-bin'
Toby Boyd's avatar
Toby Boyd committed
33

34

Toby Boyd's avatar
Toby Boyd committed
35
36
class Resnet56KerasAccuracy(keras_benchmark.KerasBenchmark):
  """Accuracy tests for ResNet56 Keras CIFAR-10."""
37

38
  def __init__(self, output_dir=None, root_data_dir=None, **kwargs):
39
40
41
42
43
    """A benchmark class.

    Args:
      output_dir: directory where to output e.g. log files
      root_data_dir: directory under which to look for dataset
44
45
46
      **kwargs: arbitrary named arguments. This is needed to make the
                constructor forward compatible in case PerfZero provides more
                named arguments before updating the constructor.
47
48
    """

49
    self.data_dir = os.path.join(root_data_dir, CIFAR_DATA_DIR_NAME)
50
    flag_methods = [keras_cifar_main.define_cifar_flags]
Toby Boyd's avatar
Toby Boyd committed
51

52
53
    super(Resnet56KerasAccuracy, self).__init__(
        output_dir=output_dir, flag_methods=flag_methods)
Toby Boyd's avatar
Toby Boyd committed
54

Toby Boyd's avatar
Toby Boyd committed
55
  def benchmark_graph_1_gpu(self):
56
    """Test keras based model with Keras fit and distribution strategies."""
Toby Boyd's avatar
Toby Boyd committed
57
    self._setup()
Toby Boyd's avatar
Toby Boyd committed
58
    FLAGS.num_gpus = 1
59
    FLAGS.data_dir = self.data_dir
Toby Boyd's avatar
Toby Boyd committed
60
61
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
62
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_1_gpu')
Toby Boyd's avatar
Toby Boyd committed
63
    FLAGS.dtype = 'fp32'
64
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
65
66

  def benchmark_1_gpu(self):
67
68
    """Test keras based model with eager and distribution strategies."""
    self._setup()
Toby Boyd's avatar
Toby Boyd committed
69
    FLAGS.num_gpus = 1
70
    FLAGS.data_dir = self.data_dir
Toby Boyd's avatar
Toby Boyd committed
71
72
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
73
    FLAGS.model_dir = self._get_model_dir('benchmark_1_gpu')
Toby Boyd's avatar
Toby Boyd committed
74
75
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
76
    self._run_and_report_benchmark()
77

78
79
80
81
82
83
84
85
86
87
88
89
90
  def benchmark_1_gpu_force_v2(self):
    """Test keras based model with eager, DS, and force_v2 path."""
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir('benchmark_1_gpu_force_v2')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
  def benchmark_cpu(self):
    """Test keras based model on CPU."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir('benchmark_cpu')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

  def benchmark_cpu_no_dist_strat(self):
    """Test keras based model on CPU without distribution strategies."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir('benchmark_cpu_no_dist_strat')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
  def benchmark_cpu_no_dist_strat_force_v2(self):
    """Keras on CPU without dist strat but with force v2 in keras.compile."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_cpu_no_dist_strat_force_v2')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.data_format = 'channels_last'
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
  def benchmark_cpu_no_dist_strat_run_eagerly(self):
    """Test keras based model on CPU w/forced eager and no dist_strat."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_cpu_no_dist_strat_run_eagerly')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.run_eagerly = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

150
151
152
153
  def benchmark_1_gpu_no_dist_strat(self):
    """Test keras based model with eager and no dist strat."""
    self._setup()
    FLAGS.num_gpus = 1
154
    FLAGS.explicit_gpu_placement = True
155
156
157
158
159
160
161
162
163
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir('benchmark_1_gpu_no_dist_strat')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'off'
    self._run_and_report_benchmark()

164
  def benchmark_1_gpu_no_dist_strat_run_eagerly(self):
165
    """Test keras based model w/forced eager and no dist_strat."""
166
167
168
169
170
171
172
173
174
175
176
177
178
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_1_gpu_no_dist_strat_run_eagerly')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.run_eagerly = True
    FLAGS.distribution_strategy = 'off'
    self._run_and_report_benchmark()

179
180
  def benchmark_graph_1_gpu_no_dist_strat(self):
    """Test keras based model with Keras fit but not distribution strategies."""
181
    self._setup()
182
183
    FLAGS.distribution_strategy = 'off'
    FLAGS.num_gpus = 1
184
    FLAGS.data_dir = self.data_dir
Toby Boyd's avatar
Toby Boyd committed
185
186
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
187
188
189
190
191
192
193
194
195
196
197
198
199
200
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_1_gpu_no_dist_strat')
    FLAGS.dtype = 'fp32'
    self._run_and_report_benchmark()

  def benchmark_1_gpu_no_dist_strat_force_v2(self):
    """No dist strat but forced v2 execution path."""
    self._setup()
    FLAGS.distribution_strategy = 'off'
    FLAGS.num_gpus = 1
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_1_gpu_no_dist_strat_force_v2')
Toby Boyd's avatar
Toby Boyd committed
201
202
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
203
    FLAGS.force_v2_in_keras_compile = True
204
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
205

206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
  def benchmark_1_gpu_force_v2_run_eagerly(self):
    """No dist strat but forced v2 path via tf.compile path and force eager."""
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.data_dir = self.data_dir
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_1_gpu_force_v2_run_eagerly')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.run_eagerly = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

  def benchmark_2_gpu(self):
    """Test keras based model with eager and distribution strategies."""
224
    self._setup()
Toby Boyd's avatar
Toby Boyd committed
225
    FLAGS.num_gpus = 2
226
    FLAGS.data_dir = self.data_dir
Toby Boyd's avatar
Toby Boyd committed
227
228
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
229
    FLAGS.model_dir = self._get_model_dir('benchmark_2_gpu')
Toby Boyd's avatar
Toby Boyd committed
230
    FLAGS.dtype = 'fp32'
231
    FLAGS.enable_eager = True
232
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
233

234
235
  def benchmark_graph_2_gpu(self):
    """Test keras based model with Keras fit and distribution strategies."""
Toby Boyd's avatar
Toby Boyd committed
236
    self._setup()
237
    FLAGS.num_gpus = 2
238
    FLAGS.data_dir = self.data_dir
Toby Boyd's avatar
Toby Boyd committed
239
240
    FLAGS.batch_size = 128
    FLAGS.train_epochs = 182
241
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_2_gpu')
Toby Boyd's avatar
Toby Boyd committed
242
    FLAGS.dtype = 'fp32'
243
244
245
246
    self._run_and_report_benchmark()

  def _run_and_report_benchmark(self):
    start_time_sec = time.time()
Toby Boyd's avatar
Toby Boyd committed
247
    stats = keras_cifar_main.run(FLAGS)
248
    wall_time_sec = time.time() - start_time_sec
Toby Boyd's avatar
Toby Boyd committed
249

250
    super(Resnet56KerasAccuracy, self)._report_benchmark(
Toby Boyd's avatar
Toby Boyd committed
251
        stats,
252
        wall_time_sec,
Toby Boyd's avatar
Toby Boyd committed
253
254
        top_1_min=MIN_TOP_1_ACCURACY,
        top_1_max=MAX_TOP_1_ACCURACY,
255
        total_batch_size=FLAGS.batch_size,
Toby Boyd's avatar
Toby Boyd committed
256
257
258
259
260
261
262
        log_steps=100)


class Resnet56KerasBenchmarkBase(keras_benchmark.KerasBenchmark):
  """Short performance tests for ResNet56 via Keras and CIFAR-10."""

  def __init__(self, output_dir=None, default_flags=None):
263
    flag_methods = [keras_cifar_main.define_cifar_flags]
Toby Boyd's avatar
Toby Boyd committed
264
265
266
267
268
269

    super(Resnet56KerasBenchmarkBase, self).__init__(
        output_dir=output_dir,
        flag_methods=flag_methods,
        default_flags=default_flags)

270
271
  def _run_and_report_benchmark(self):
    start_time_sec = time.time()
Toby Boyd's avatar
Toby Boyd committed
272
    stats = keras_cifar_main.run(FLAGS)
273
274
275
276
277
278
279
    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)
Toby Boyd's avatar
Toby Boyd committed
280

281
282
  def benchmark_1_gpu(self):
    """Test 1 gpu."""
283
284
285
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.enable_eager = True
286
287
    FLAGS.distribution_strategy = 'default'
    FLAGS.model_dir = self._get_model_dir('benchmark_1_gpu')
288
289
290
    FLAGS.batch_size = 128
    self._run_and_report_benchmark()

291
292
293
294
295
296
297
298
299
300
301
  def benchmark_1_gpu_force_v2(self):
    """Test 1 gpu using forced v2 execution path."""
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'default'
    FLAGS.model_dir = self._get_model_dir('benchmark_1_gpu')
    FLAGS.batch_size = 128
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

302
303
  def benchmark_graph_1_gpu(self):
    """Test 1 gpu graph."""
Toby Boyd's avatar
Toby Boyd committed
304
305
306
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.enable_eager = False
307
308
    FLAGS.distribution_strategy = 'default'
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_1_gpu')
Toby Boyd's avatar
Toby Boyd committed
309
    FLAGS.batch_size = 128
310
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
311

312
313
  def benchmark_1_gpu_no_dist_strat(self):
    """Test 1 gpu without distribution strategies."""
Toby Boyd's avatar
Toby Boyd committed
314
315
316
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.enable_eager = True
317
318
    FLAGS.distribution_strategy = 'off'
    FLAGS.model_dir = self._get_model_dir('benchmark_1_gpu_no_dist_strat')
Toby Boyd's avatar
Toby Boyd committed
319
    FLAGS.batch_size = 128
320
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
321

322
323
  def benchmark_graph_1_gpu_no_dist_strat(self):
    """Test 1 gpu graph mode without distribution strategies."""
Toby Boyd's avatar
Toby Boyd committed
324
325
326
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.enable_eager = False
327
328
    FLAGS.distribution_strategy = 'off'
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_1_gpu_no_dist_strat')
Toby Boyd's avatar
Toby Boyd committed
329
    FLAGS.batch_size = 128
330
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
331

332
  def benchmark_1_gpu_no_dist_strat_run_eagerly(self):
333
    """Test 1 gpu without distribution strategy and forced eager."""
334
335
336
337
338
339
340
341
342
343
344
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.batch_size = 128
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_1_gpu_no_dist_strat_run_eagerly')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.run_eagerly = True
    FLAGS.distribution_strategy = 'off'
    self._run_and_report_benchmark()

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
  def benchmark_1_gpu_no_dist_strat_force_v2(self):
    """No dist strat but forced v2 execution path."""
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.batch_size = 128
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_1_gpu_no_dist_strat_force_v2')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

  def benchmark_1_gpu_no_dist_strat_force_v2_run_eagerly(self):
    """Forced v2 execution path and forced eager."""
    self._setup()
    FLAGS.num_gpus = 1
    FLAGS.batch_size = 128
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_1_gpu_no_dist_strat_force_v2_run_eagerly')
    FLAGS.dtype = 'fp32'
    FLAGS.enable_eager = True
    FLAGS.run_eagerly = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

Toby Boyd's avatar
Toby Boyd committed
372
  def benchmark_2_gpu(self):
373
    """Test 2 gpu."""
Toby Boyd's avatar
Toby Boyd committed
374
375
376
    self._setup()
    FLAGS.num_gpus = 2
    FLAGS.enable_eager = True
377
    FLAGS.distribution_strategy = 'default'
378
    FLAGS.model_dir = self._get_model_dir('benchmark_2_gpu')
Toby Boyd's avatar
Toby Boyd committed
379
    FLAGS.batch_size = 128 * 2  # 2 GPUs
380
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
381
382

  def benchmark_graph_2_gpu(self):
383
    """Test 2 gpu graph mode."""
Toby Boyd's avatar
Toby Boyd committed
384
385
386
    self._setup()
    FLAGS.num_gpus = 2
    FLAGS.enable_eager = False
387
    FLAGS.distribution_strategy = 'default'
388
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_2_gpu')
Toby Boyd's avatar
Toby Boyd committed
389
    FLAGS.batch_size = 128 * 2  # 2 GPUs
390
    self._run_and_report_benchmark()
Toby Boyd's avatar
Toby Boyd committed
391

392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
  def benchmark_cpu(self):
    """Test cpu."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.enable_eager = True
    FLAGS.model_dir = self._get_model_dir('benchmark_cpu')
    FLAGS.batch_size = 128
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

  def benchmark_graph_cpu(self):
    """Test cpu graph mode."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.enable_eager = False
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_cpu')
    FLAGS.batch_size = 128
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

  def benchmark_cpu_no_dist_strat_run_eagerly(self):
    """Test cpu without distribution strategy and forced eager."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.distribution_strategy = 'off'
    FLAGS.enable_eager = True
    FLAGS.run_eagerly = True
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_cpu_no_dist_strat_run_eagerly')
    FLAGS.batch_size = 128
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

  def benchmark_cpu_no_dist_strat(self):
    """Test cpu without distribution strategies."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.model_dir = self._get_model_dir('benchmark_cpu_no_dist_strat')
    FLAGS.batch_size = 128
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

436
437
438
439
440
441
442
443
444
445
446
447
448
  def benchmark_cpu_no_dist_strat_force_v2(self):
    """Test cpu without dist strat and force v2 in model.compile."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.enable_eager = True
    FLAGS.distribution_strategy = 'off'
    FLAGS.model_dir = self._get_model_dir(
        'benchmark_cpu_no_dist_strat_force_v2')
    FLAGS.batch_size = 128
    FLAGS.data_format = 'channels_last'
    FLAGS.force_v2_in_keras_compile = True
    self._run_and_report_benchmark()

449
450
451
452
453
454
455
456
457
458
459
  def benchmark_graph_cpu_no_dist_strat(self):
    """Test cpu graph mode without distribution strategies."""
    self._setup()
    FLAGS.num_gpus = 0
    FLAGS.enable_eager = False
    FLAGS.distribution_strategy = 'off'
    FLAGS.model_dir = self._get_model_dir('benchmark_graph_cpu_no_dist_strat')
    FLAGS.batch_size = 128
    FLAGS.data_format = 'channels_last'
    self._run_and_report_benchmark()

Toby Boyd's avatar
Toby Boyd committed
460
461
462
463

class Resnet56KerasBenchmarkSynth(Resnet56KerasBenchmarkBase):
  """Synthetic benchmarks for ResNet56 and Keras."""

464
  def __init__(self, output_dir=None, root_data_dir=None, **kwargs):
465
466
467
468
469
    default_flags = {}
    default_flags['skip_eval'] = True
    default_flags['use_synthetic_data'] = True
    default_flags['train_steps'] = 110
    default_flags['log_steps'] = 10
Toby Boyd's avatar
Toby Boyd committed
470

471
    super(Resnet56KerasBenchmarkSynth, self).__init__(
472
        output_dir=output_dir, default_flags=default_flags)
Toby Boyd's avatar
Toby Boyd committed
473
474
475
476
477


class Resnet56KerasBenchmarkReal(Resnet56KerasBenchmarkBase):
  """Real data benchmarks for ResNet56 and Keras."""

478
  def __init__(self, output_dir=None, root_data_dir=None, **kwargs):
479
480
481
482
483
    default_flags = {}
    default_flags['skip_eval'] = True
    default_flags['data_dir'] = os.path.join(root_data_dir, CIFAR_DATA_DIR_NAME)
    default_flags['train_steps'] = 110
    default_flags['log_steps'] = 10
Toby Boyd's avatar
Toby Boyd committed
484

485
    super(Resnet56KerasBenchmarkReal, self).__init__(
486
        output_dir=output_dir, default_flags=default_flags)
487
488
489
490


if __name__ == '__main__':
  tf.test.main()