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
42420ce8
Commit
42420ce8
authored
Dec 19, 2018
by
Shining Sun
Browse files
Clean up keras_resnet_model and rename it to resnet56
parent
cd034c8c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
306 additions
and
5 deletions
+306
-5
official/resnet/keras/keras_cifar_main.py
official/resnet/keras/keras_cifar_main.py
+4
-5
official/resnet/keras/resnet56.py
official/resnet/keras/resnet56.py
+302
-0
No files found.
official/resnet/keras/keras_cifar_main.py
View file @
42420ce8
...
...
@@ -28,7 +28,7 @@ import tensorflow as tf # pylint: disable=g-bad-import-order
from
official.resnet
import
cifar10_main
as
cifar_main
from
official.resnet
import
resnet_run_loop
from
official.resnet.keras
import
keras_common
from
official.resnet.keras
import
keras_resnet_model
from
official.resnet.keras
import
resnet56
from
official.utils.flags
import
core
as
flags_core
from
official.utils.logs
import
logger
from
official.utils.misc
import
distribution_utils
...
...
@@ -167,10 +167,9 @@ def run_cifar_with_keras(flags_obj):
opt
,
loss
,
accuracy
=
keras_common
.
get_optimizer_loss_and_metrics
()
strategy
=
keras_common
.
get_dist_strategy
()
model
=
keras_resnet_model
.
ResNet56
(
input_shape
=
(
32
,
32
,
3
),
include_top
=
True
,
classes
=
cifar_main
.
_NUM_CLASSES
,
weights
=
None
)
model
=
resnet56
.
ResNet56
(
input_shape
=
(
32
,
32
,
3
),
classes
=
cifar_main
.
_NUM_CLASSES
)
model
.
compile
(
loss
=
loss
,
optimizer
=
opt
,
metrics
=
[
accuracy
],
...
...
official/resnet/keras/
keras_resnet_model
.py
→
official/resnet/keras/
resnet56
.py
View file @
42420ce8
This diff is collapsed.
Click to expand it.
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