Commit ab285838 authored by Zader Zheng's avatar Zader Zheng Committed by Karmel Allison
Browse files

fix python3 numpy load in skip_thoughts (#2398)

parent 17a5bdc8
......@@ -69,8 +69,7 @@ class EncoderManager(object):
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()
# with 3 arguments.
with open(embedding_matrix_file, "r") as f:
embedding_matrix = np.load(f)
embedding_matrix = np.load(embedding_matrix_file)
tf.logging.info("Loaded embedding matrix with shape %s",
embedding_matrix.shape)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment