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
ab285838
Commit
ab285838
authored
Feb 28, 2018
by
Zader Zheng
Committed by
Karmel Allison
Feb 27, 2018
Browse files
fix python3 numpy load in skip_thoughts (#2398)
parent
17a5bdc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
research/skip_thoughts/skip_thoughts/encoder_manager.py
research/skip_thoughts/skip_thoughts/encoder_manager.py
+1
-2
No files found.
research/skip_thoughts/skip_thoughts/encoder_manager.py
View file @
ab285838
...
@@ -69,8 +69,7 @@ class EncoderManager(object):
...
@@ -69,8 +69,7 @@ class EncoderManager(object):
tf
.
logging
.
info
(
"Loading embedding matrix from %s"
,
embedding_matrix_file
)
tf
.
logging
.
info
(
"Loading embedding matrix from %s"
,
embedding_matrix_file
)
# Note: tf.gfile.GFile doesn't work here because np.load() calls f.seek()
# Note: tf.gfile.GFile doesn't work here because np.load() calls f.seek()
# with 3 arguments.
# with 3 arguments.
with
open
(
embedding_matrix_file
,
"r"
)
as
f
:
embedding_matrix
=
np
.
load
(
embedding_matrix_file
)
embedding_matrix
=
np
.
load
(
f
)
tf
.
logging
.
info
(
"Loaded embedding matrix with shape %s"
,
tf
.
logging
.
info
(
"Loaded embedding matrix with shape %s"
,
embedding_matrix
.
shape
)
embedding_matrix
.
shape
)
...
...
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