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
2472278c
"vscode:/vscode.git/clone" did not exist on "672977c1bc3fd0d37c91ab0a2828c56bbd2b0769"
Unverified
Commit
2472278c
authored
Aug 10, 2018
by
Yanhui Liang
Committed by
GitHub
Aug 10, 2018
Browse files
Fix typos of model name (#5063)
parent
83a9a239
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
official/keras_application_models/dataset.py
official/keras_application_models/dataset.py
+4
-5
No files found.
official/keras_application_models/dataset.py
View file @
2472278c
...
@@ -18,7 +18,6 @@ from __future__ import division
...
@@ -18,7 +18,6 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.utils.misc
import
model_helpers
# pylint: disable=g-bad-import-order
from
official.utils.misc
import
model_helpers
# pylint: disable=g-bad-import-order
# Default values for dataset.
# Default values for dataset.
...
@@ -29,7 +28,7 @@ _NUM_CLASSES = 1000
...
@@ -29,7 +28,7 @@ _NUM_CLASSES = 1000
def
_get_default_image_size
(
model
):
def
_get_default_image_size
(
model
):
"""Provide default image size for each model."""
"""Provide default image size for each model."""
image_size
=
(
224
,
224
)
image_size
=
(
224
,
224
)
if
model
in
[
"inception"
,
"xception"
,
"inceptionresnet"
]:
if
model
in
[
"inception
v3
"
,
"xception"
,
"inceptionresnet
v2
"
]:
image_size
=
(
299
,
299
)
image_size
=
(
299
,
299
)
elif
model
in
[
"nasnetlarge"
]:
elif
model
in
[
"nasnetlarge"
]:
image_size
=
(
331
,
331
)
image_size
=
(
331
,
331
)
...
@@ -42,8 +41,8 @@ def generate_synthetic_input_dataset(model, batch_size):
...
@@ -42,8 +41,8 @@ def generate_synthetic_input_dataset(model, batch_size):
image_shape
=
(
batch_size
,)
+
image_size
+
(
_NUM_CHANNELS
,)
image_shape
=
(
batch_size
,)
+
image_size
+
(
_NUM_CHANNELS
,)
label_shape
=
(
batch_size
,
_NUM_CLASSES
)
label_shape
=
(
batch_size
,
_NUM_CLASSES
)
return
model_helpers
.
generate_synthetic_data
(
dataset
=
model_helpers
.
generate_synthetic_data
(
input_shape
=
tf
.
TensorShape
(
image_shape
),
input_shape
=
tf
.
TensorShape
(
image_shape
),
input_dtype
=
tf
.
float32
,
label_shape
=
tf
.
TensorShape
(
label_shape
),
label_shape
=
tf
.
TensorShape
(
label_shape
),
label_dtype
=
tf
.
float32
)
)
return
dataset
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