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
504bc193
Commit
504bc193
authored
Jul 18, 2017
by
Neal Wu
Committed by
GitHub
Jul 18, 2017
Browse files
Merge pull request #1922 from emsansone/issue-#1858
fix issue #1858
parents
2cae3c06
169550ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
tutorials/rnn/ptb/reader.py
tutorials/rnn/ptb/reader.py
+1
-4
No files found.
tutorials/rnn/ptb/reader.py
View file @
504bc193
...
@@ -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