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
7522e4dc
Commit
7522e4dc
authored
Dec 26, 2018
by
Toby Boyd
Browse files
fix lint issues
parent
c868da8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
official/resnet/keras/resnet_cifar_model.py
official/resnet/keras/resnet_cifar_model.py
+4
-4
No files found.
official/resnet/keras/resnet_cifar_model.py
View file @
7522e4dc
...
@@ -23,9 +23,9 @@ from __future__ import absolute_import
...
@@ -23,9 +23,9 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
print_function
import
warnings
import
tensorflow
as
tf
import
tensorflow
as
tf
from
tensorflow.python.keras
import
backend
from
tensorflow.python.keras
import
layers
BATCH_NORM_DECAY
=
0.997
BATCH_NORM_DECAY
=
0.997
...
@@ -180,7 +180,6 @@ def resnet56(classes=100, training=None):
...
@@ -180,7 +180,6 @@ def resnet56(classes=100, training=None):
"""Instantiates the ResNet56 architecture.
"""Instantiates the ResNet56 architecture.
Arguments:
Arguments:
input_shape: optional shape tuple
classes: optional number of classes to classify images into
classes: optional number of classes to classify images into
training: Only used if training keras model with Estimator. In other
training: Only used if training keras model with Estimator. In other
scenarios it is handled automatically.
scenarios it is handled automatically.
...
@@ -192,10 +191,11 @@ def resnet56(classes=100, training=None):
...
@@ -192,10 +191,11 @@ def resnet56(classes=100, training=None):
if
backend
.
image_data_format
()
==
'channels_first'
:
if
backend
.
image_data_format
()
==
'channels_first'
:
input_shape
=
(
3
,
32
,
32
)
input_shape
=
(
3
,
32
,
32
)
bn_axis
=
1
bn_axis
=
1
else
:
# channel_last
else
:
# channel_last
input_shape
=
(
32
,
32
,
3
)
input_shape
=
(
32
,
32
,
3
)
bn_axis
=
3
bn_axis
=
3
img_input
=
layers
.
Input
(
shape
=
input_shape
)
x
=
tf
.
keras
.
layers
.
ZeroPadding2D
(
padding
=
(
1
,
1
),
name
=
'conv1_pad'
)(
img_input
)
x
=
tf
.
keras
.
layers
.
ZeroPadding2D
(
padding
=
(
1
,
1
),
name
=
'conv1_pad'
)(
img_input
)
x
=
tf
.
keras
.
layers
.
Conv2D
(
16
,
(
3
,
3
),
x
=
tf
.
keras
.
layers
.
Conv2D
(
16
,
(
3
,
3
),
strides
=
(
1
,
1
),
strides
=
(
1
,
1
),
...
...
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