Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
dbdd17c4
Commit
dbdd17c4
authored
Jan 28, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Jan 28, 2020
Browse files
Move resnet cifar to benchmark models.
PiperOrigin-RevId: 292007895
parent
294579ca
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
31 deletions
+8
-31
official/benchmark/keras_cifar_benchmark.py
official/benchmark/keras_cifar_benchmark.py
+1
-1
official/benchmark/models/resnet_cifar_main.py
official/benchmark/models/resnet_cifar_main.py
+2
-3
official/benchmark/models/resnet_cifar_model.py
official/benchmark/models/resnet_cifar_model.py
+0
-0
official/benchmark/models/resnet_cifar_test.py
official/benchmark/models/resnet_cifar_test.py
+1
-1
official/vision/image_classification/README.md
official/vision/image_classification/README.md
+4
-26
No files found.
official/benchmark/keras_cifar_benchmark.py
View file @
dbdd17c4
...
...
@@ -24,7 +24,7 @@ import tensorflow as tf # pylint: disable=g-bad-import-order
from
official.benchmark
import
keras_benchmark
from
official.utils.testing
import
benchmark_wrappers
from
official.
vision.image_classification
import
resnet_cifar_main
from
official.
benchmark.models
import
resnet_cifar_main
MIN_TOP_1_ACCURACY
=
0.929
MAX_TOP_1_ACCURACY
=
0.938
...
...
official/
vision/image_classification
/resnet_cifar_main.py
→
official/
benchmark/models
/resnet_cifar_main.py
View file @
dbdd17c4
...
...
@@ -18,17 +18,16 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
print_function
from
absl
import
flags
from
absl
import
app
as
absl_app
from
absl
import
flags
import
tensorflow
as
tf
from
official.benchmark.models
import
resnet_cifar_model
from
official.utils.flags
import
core
as
flags_core
from
official.utils.logs
import
logger
from
official.utils.misc
import
distribution_utils
from
official.utils.misc
import
keras_utils
from
official.vision.image_classification
import
cifar_preprocessing
from
official.vision.image_classification
import
common
from
official.vision.image_classification
import
resnet_cifar_model
LR_SCHEDULE
=
[
# (multiplier, epoch to start) tuples
...
...
official/
vision/image_classification
/resnet_cifar_model.py
→
official/
benchmark/models
/resnet_cifar_model.py
View file @
dbdd17c4
File moved
official/
vision/image_classification
/resnet_cifar_test.py
→
official/
benchmark/models
/resnet_cifar_test.py
View file @
dbdd17c4
...
...
@@ -24,10 +24,10 @@ import tensorflow as tf
from
tensorflow.python.eager
import
context
from
tensorflow.python.platform
import
googletest
from
official.benchmark.models
import
resnet_cifar_main
from
official.utils.misc
import
keras_utils
from
official.utils.testing
import
integration
from
official.vision.image_classification
import
cifar_preprocessing
from
official.vision.image_classification
import
resnet_cifar_main
class
KerasCifarTest
(
googletest
.
TestCase
):
...
...
official/vision/image_classification/README.md
View file @
dbdd17c4
...
...
@@ -11,13 +11,11 @@ For more information about other types of models, please refer to this
## ResNet
Similar to the
[
estimator implementation
](
../../r1/resnet
)
, the Keras
implementation has code for both CIFAR-10 data and ImageNet data. The CIFAR-10
version uses a ResNet56 model implemented in
[
`resnet_cifar_model.py`
](
./resnet_cifar_model.py
)
, and the ImageNet version
uses a ResNet50 model implemented in
[
`resnet_model.py`
](
./resnet_model.py
)
.
implementation has code for the ImageNet dataset. The ImageNet
version uses a ResNet50 model implemented in
[
`resnet_model.py`
](
./resnet_model.py
)
.
To use
either dataset, make sure that you have the latest version of TensorFlow
Please make sure that you have the latest version of TensorFlow
installed and
[
add the models folder to your Python path
](
/official/#running-the-models
)
.
...
...
@@ -28,26 +26,6 @@ installed and
*
ResNet50 TFHub:
[
feature vector
](
https://tfhub.dev/tensorflow/resnet_50/feature_vector/1
)
and
[
classification
](
https://tfhub.dev/tensorflow/resnet_50/classification/1
)
### CIFAR-10
Download and extract the CIFAR-10 data. You can use the following script:
```
bash
python ../../r1/resnet/cifar10_download_and_extract.py
```
After you download the data, you can run the program by:
```
bash
python resnet_cifar_main.py
```
If you did not use the default directory to download the data, specify the
location with the
`--data_dir`
flag, like:
```
bash
python resnet_cifar_main.py
--data_dir
=
/path/to/cifar
```
### ImageNet Training
Download the ImageNet dataset and convert it to TFRecord format.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment