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
5ec4c759
Commit
5ec4c759
authored
Feb 07, 2018
by
Neal Wu
Browse files
Fix mnist_tpu.py which was giving unknown shape errors
parent
40d29d42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
official/mnist/dataset.py
official/mnist/dataset.py
+1
-0
No files found.
official/mnist/dataset.py
View file @
5ec4c759
...
@@ -91,6 +91,7 @@ def dataset(directory, images_file, labels_file):
...
@@ -91,6 +91,7 @@ def dataset(directory, images_file, labels_file):
def
decode_label
(
label
):
def
decode_label
(
label
):
label
=
tf
.
decode_raw
(
label
,
tf
.
uint8
)
# tf.string -> [tf.uint8]
label
=
tf
.
decode_raw
(
label
,
tf
.
uint8
)
# tf.string -> [tf.uint8]
label
=
tf
.
reshape
(
label
,
[])
# label is a scalar
return
tf
.
to_int32
(
label
)
return
tf
.
to_int32
(
label
)
images
=
tf
.
data
.
FixedLengthRecordDataset
(
images
=
tf
.
data
.
FixedLengthRecordDataset
(
...
...
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