瀏覽代碼

Replaced direct path concatenation with os.path.join

Neal Wu 9 年之前
父節點
當前提交
f5712d0c2f
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      tutorials/embedding/word2vec.py
  2. 1 1
      tutorials/embedding/word2vec_optimized.py

+ 1 - 1
tutorials/embedding/word2vec.py

@@ -42,7 +42,7 @@ from six.moves import xrange  # pylint: disable=redefined-builtin
 import numpy as np
 import tensorflow as tf
 
-word2vec = tf.load_op_library(os.path.dirname(os.path.realpath(__file__)) + '/word2vec_ops.so')
+word2vec = tf.load_op_library(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'word2vec_ops.so'))
 
 flags = tf.app.flags
 

+ 1 - 1
tutorials/embedding/word2vec_optimized.py

@@ -41,7 +41,7 @@ from six.moves import xrange  # pylint: disable=redefined-builtin
 import numpy as np
 import tensorflow as tf
 
-word2vec = tf.load_op_library(os.path.dirname(os.path.realpath(__file__)) + '/word2vec_ops.so')
+word2vec = tf.load_op_library(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'word2vec_ops.so'))
 
 flags = tf.app.flags