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
8a5702f2
Commit
8a5702f2
authored
Oct 22, 2019
by
Ruoxin Sang
Committed by
A. Unique TensorFlower
Oct 22, 2019
Browse files
Internal change
PiperOrigin-RevId: 276103495
parent
444e8c79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
official/vision/image_classification/imagenet_preprocessing.py
...ial/vision/image_classification/imagenet_preprocessing.py
+0
-9
No files found.
official/vision/image_classification/imagenet_preprocessing.py
View file @
8a5702f2
...
@@ -104,21 +104,12 @@ def process_record_dataset(dataset,
...
@@ -104,21 +104,12 @@ def process_record_dataset(dataset,
logging
.
info
(
logging
.
info
(
'datasets_num_private_threads: %s'
,
datasets_num_private_threads
)
'datasets_num_private_threads: %s'
,
datasets_num_private_threads
)
# Disable intra-op parallelism to optimize for throughput instead of latency.
options
=
tf
.
data
.
Options
()
options
.
experimental_threading
.
max_intra_op_parallelism
=
1
dataset
=
dataset
.
with_options
(
options
)
# Prefetches a batch at a time to smooth out the time taken to load input
# files for shuffling and processing.
dataset
=
dataset
.
prefetch
(
buffer_size
=
batch_size
)
if
is_training
:
if
is_training
:
# Shuffles records before repeating to respect epoch boundaries.
# Shuffles records before repeating to respect epoch boundaries.
dataset
=
dataset
.
shuffle
(
buffer_size
=
shuffle_buffer
)
dataset
=
dataset
.
shuffle
(
buffer_size
=
shuffle_buffer
)
# Repeats the dataset for the number of epochs to train.
# Repeats the dataset for the number of epochs to train.
dataset
=
dataset
.
repeat
()
dataset
=
dataset
.
repeat
()
# Parses the raw records into images and labels.
# Parses the raw records into images and labels.
dataset
=
dataset
.
map
(
dataset
=
dataset
.
map
(
lambda
value
:
parse_record_fn
(
value
,
is_training
,
dtype
),
lambda
value
:
parse_record_fn
(
value
,
is_training
,
dtype
),
...
...
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