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
5799727b
"docs/vscode:/vscode.git/clone" did not exist on "bb204696c19ded90121caea82e34fa3ff0bd131f"
Commit
5799727b
authored
Dec 28, 2017
by
Joseph Friedman
Browse files
change file open mode to rb
parent
fad60753
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
research/im2txt/im2txt/run_inference.py
research/im2txt/im2txt/run_inference.py
+1
-1
No files found.
research/im2txt/im2txt/run_inference.py
View file @
5799727b
...
@@ -70,7 +70,7 @@ def main(_):
...
@@ -70,7 +70,7 @@ def main(_):
generator
=
caption_generator
.
CaptionGenerator
(
model
,
vocab
)
generator
=
caption_generator
.
CaptionGenerator
(
model
,
vocab
)
for
filename
in
filenames
:
for
filename
in
filenames
:
with
tf
.
gfile
.
GFile
(
filename
,
"r"
)
as
f
:
with
tf
.
gfile
.
GFile
(
filename
,
"r
b
"
)
as
f
:
image
=
f
.
read
()
image
=
f
.
read
()
captions
=
generator
.
beam_search
(
sess
,
image
)
captions
=
generator
.
beam_search
(
sess
,
image
)
print
(
"Captions for image %s:"
%
os
.
path
.
basename
(
filename
))
print
(
"Captions for image %s:"
%
os
.
path
.
basename
(
filename
))
...
...
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