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
ae86bfd9
"git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "50a6eda889cf2d207eb6b77adc3cd873803efbb6"
Unverified
Commit
ae86bfd9
authored
Jan 07, 2019
by
Tian Lin
Committed by
GitHub
Jan 07, 2019
Browse files
Add repeat to datasets. (#6001)
parent
fd2802cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/keras_application_models/dataset.py
official/keras_application_models/dataset.py
+2
-2
No files found.
official/keras_application_models/dataset.py
View file @
ae86bfd9
...
@@ -69,6 +69,6 @@ class Cifar10Dataset(object):
...
@@ -69,6 +69,6 @@ class Cifar10Dataset(object):
y_train
=
tf
.
keras
.
utils
.
to_categorical
(
y_train
,
self
.
num_classes
)
y_train
=
tf
.
keras
.
utils
.
to_categorical
(
y_train
,
self
.
num_classes
)
y_test
=
tf
.
keras
.
utils
.
to_categorical
(
y_test
,
self
.
num_classes
)
y_test
=
tf
.
keras
.
utils
.
to_categorical
(
y_test
,
self
.
num_classes
)
self
.
train_dataset
=
tf
.
data
.
Dataset
.
from_tensor_slices
(
self
.
train_dataset
=
tf
.
data
.
Dataset
.
from_tensor_slices
(
(
x_train
,
y_train
)).
shuffle
(
2000
).
batch
(
batch_size
)
(
x_train
,
y_train
)).
shuffle
(
2000
).
batch
(
batch_size
)
.
repeat
()
self
.
test_dataset
=
tf
.
data
.
Dataset
.
from_tensor_slices
(
self
.
test_dataset
=
tf
.
data
.
Dataset
.
from_tensor_slices
(
(
x_test
,
y_test
)).
shuffle
(
2000
).
batch
(
batch_size
)
(
x_test
,
y_test
)).
shuffle
(
2000
).
batch
(
batch_size
)
.
repeat
()
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