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
33ca217f
Commit
33ca217f
authored
Sep 26, 2017
by
Niyaz
Committed by
Neal Wu
Sep 26, 2017
Browse files
Fixing the filename check for PNG files (#2450)
parent
16e46798
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/inception/inception/data/build_image_data.py
research/inception/inception/data/build_image_data.py
+2
-2
No files found.
research/inception/inception/data/build_image_data.py
View file @
33ca217f
...
@@ -183,7 +183,7 @@ def _is_png(filename):
...
@@ -183,7 +183,7 @@ def _is_png(filename):
Returns:
Returns:
boolean indicating if the image is a PNG.
boolean indicating if the image is a PNG.
"""
"""
return
'.png'
in
filename
return
filename
.
endswith
(
'.png'
)
def
_process_image
(
filename
,
coder
):
def
_process_image
(
filename
,
coder
):
...
@@ -264,7 +264,7 @@ def _process_image_files_batch(coder, thread_index, ranges, name, filenames,
...
@@ -264,7 +264,7 @@ def _process_image_files_batch(coder, thread_index, ranges, name, filenames,
image_buffer
,
height
,
width
=
_process_image
(
filename
,
coder
)
image_buffer
,
height
,
width
=
_process_image
(
filename
,
coder
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
)
print
(
e
)
print
(
'SKIPPED: Unexpected eror while decoding %s.'
%
filename
)
print
(
'SKIPPED: Unexpected er
r
or while decoding %s.'
%
filename
)
continue
continue
example
=
_convert_to_example
(
filename
,
image_buffer
,
label
,
example
=
_convert_to_example
(
filename
,
image_buffer
,
label
,
...
...
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