Commit a174bf5b authored by Allen Wang's avatar Allen Wang Committed by A. Unique TensorFlower
Browse files

Move resnet_imagenet_benchmark.py to the benchmarks/models folder.

PiperOrigin-RevId: 307137297
parent b3ab2074
...@@ -28,8 +28,8 @@ import tensorflow as tf # pylint: disable=g-bad-import-order ...@@ -28,8 +28,8 @@ import tensorflow as tf # pylint: disable=g-bad-import-order
from official.benchmark import benchmark_wrappers from official.benchmark import benchmark_wrappers
from official.benchmark import keras_benchmark from official.benchmark import keras_benchmark
from official.benchmark.models import resnet_imagenet_main
from official.vision.image_classification import classifier_trainer from official.vision.image_classification import classifier_trainer
from official.vision.image_classification.resnet import resnet_imagenet_main
MIN_TOP_1_ACCURACY = 0.76 MIN_TOP_1_ACCURACY = 0.76
MAX_TOP_1_ACCURACY = 0.77 MAX_TOP_1_ACCURACY = 0.77
......
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
......
This folder contains a compile/fit and This folder contains a
[custom training loop (CTL)](#resnet-custom-training-loop) implementation for [custom training loop (CTL)](#resnet-custom-training-loop) implementation for
ResNet50. ResNet50.
...@@ -21,15 +21,11 @@ version uses a ResNet50 model implemented in ...@@ -21,15 +21,11 @@ version uses a ResNet50 model implemented in
* ResNet50 TFHub: [feature vector](https://tfhub.dev/tensorflow/resnet_50/feature_vector/1) * ResNet50 TFHub: [feature vector](https://tfhub.dev/tensorflow/resnet_50/feature_vector/1)
and [classification](https://tfhub.dev/tensorflow/resnet_50/classification/1) and [classification](https://tfhub.dev/tensorflow/resnet_50/classification/1)
```bash
python3 resnet_imagenet_main.py
```
Again, if you did not download the data to the default directory, specify the Again, if you did not download the data to the default directory, specify the
location with the `--data_dir` flag: location with the `--data_dir` flag:
```bash ```bash
python3 resnet_imagenet_main.py --data_dir=/path/to/imagenet python3 resnet_ctl_imagenet_main.py --data_dir=/path/to/imagenet
``` ```
There are more flag options you can specify. Here are some examples: There are more flag options you can specify. Here are some examples:
...@@ -48,7 +44,7 @@ For example, this is a typical command line to run with ImageNet data with ...@@ -48,7 +44,7 @@ For example, this is a typical command line to run with ImageNet data with
batch size 128 per GPU: batch size 128 per GPU:
```bash ```bash
python3 -m resnet_imagenet_main.py \ python3 -m resnet_ctl_imagenet_main.py \
--model_dir=/tmp/model_dir/something \ --model_dir=/tmp/model_dir/something \
--num_gpus=2 \ --num_gpus=2 \
--batch_size=128 \ --batch_size=128 \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment