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
5c771ea9
Commit
5c771ea9
authored
Jul 18, 2017
by
Allen Lavoie
Browse files
Merge remote-tracking branch 'myrepo/master'
parents
44bdf29f
504bc193
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
im2txt/README.md
im2txt/README.md
+1
-1
tutorials/rnn/ptb/reader.py
tutorials/rnn/ptb/reader.py
+1
-4
No files found.
im2txt/README.md
View file @
5c771ea9
...
@@ -322,7 +322,7 @@ bazel-bin/im2txt/run_inference \
...
@@ -322,7 +322,7 @@ bazel-bin/im2txt/run_inference \
Example output:
Example output:
```
shell
```
Captions for image COCO_val2014_000000224477.jpg:
Captions for image COCO_val2014_000000224477.jpg:
0) a man riding a wave on top of a surfboard . (p=0.040413)
0) a man riding a wave on top of a surfboard . (p=0.040413)
1) a person riding a surf board on a wave (p=0.017452)
1) a person riding a surf board on a wave (p=0.017452)
...
...
tutorials/rnn/ptb/reader.py
View file @
5c771ea9
...
@@ -28,10 +28,7 @@ import tensorflow as tf
...
@@ -28,10 +28,7 @@ import tensorflow as tf
def
_read_words
(
filename
):
def
_read_words
(
filename
):
with
tf
.
gfile
.
GFile
(
filename
,
"r"
)
as
f
:
with
tf
.
gfile
.
GFile
(
filename
,
"r"
)
as
f
:
if
sys
.
version_info
[
0
]
>=
3
:
return
f
.
read
().
decode
(
"utf-8"
).
replace
(
"
\n
"
,
"<eos>"
).
split
()
return
f
.
read
().
replace
(
"
\n
"
,
"<eos>"
).
split
()
else
:
return
f
.
read
().
decode
(
"utf-8"
).
replace
(
"
\n
"
,
"<eos>"
).
split
()
def
_build_vocab
(
filename
):
def
_build_vocab
(
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