Skip to content

Commit 657f1d9

Browse files
DSLituievVijay Vasudevan
authored and
Vijay Vasudevan
committed
Python3 word2vec compatibility issue tensorflow#1760 fixed
1 parent 263d00d commit 657f1d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow/examples/tutorials/word2vec/word2vec_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def generate_batch(batch_size, num_skips, skip_window):
128128
# construction are also the most frequent.
129129
valid_size = 16 # Random set of words to evaluate similarity on.
130130
valid_window = 100 # Only pick dev samples in the head of the distribution.
131-
valid_examples = np.array(random.sample(np.arange(valid_window), valid_size))
131+
valid_examples = np.array(random.sample(range(valid_window), valid_size))
132132
num_sampled = 64 # Number of negative examples to sample.
133133

134134
graph = tf.Graph()

0 commit comments

Comments
 (0)