Searched refs:num_skips (Results 1 – 4 of 4) sorted by relevance
/external/tensorflow/tensorflow/examples/tutorials/word2vec/ |
D | word2vec_basic.py | 111 def generate_batch(batch_size, num_skips, skip_window): argument 113 assert batch_size % num_skips == 0 114 assert num_skips <= 2 * skip_window 123 for i in range(batch_size // num_skips): 125 words_to_use = random.sample(context_words, num_skips) 127 batch[i * num_skips + j] = buffer[skip_window] 128 labels[i * num_skips + j, 0] = buffer[context_word] 139 batch, labels = generate_batch(batch_size=8, num_skips=2, skip_window=1) 149 num_skips = 2 # How many times to reuse an input to generate a label. 239 batch_inputs, batch_labels = generate_batch(batch_size, num_skips,
|
/external/tensorflow/tensorflow/core/lib/random/ |
D | random_distributions.h | 266 void Skip(uint64 num_skips) { in Skip() argument 267 if (!num_skips) { in Skip() 271 if (num_skips <= num_unused_results) { in Skip() 272 used_result_index_ += num_skips; in Skip() 275 num_skips -= num_unused_results; in Skip() 277 SkipFromGenerator(num_skips / kNativeElementCount); in Skip() 278 num_skips = num_skips % kNativeElementCount; in Skip() 279 if (num_skips) { in Skip() 281 used_result_index_ = num_skips; in Skip() 290 void SkipFromGenerator(uint64 num_skips) { in SkipFromGenerator() argument [all …]
|
D | random_distributions.cc | 22 void SingleSampleAdapter<PhiloxRandom>::SkipFromGenerator(uint64 num_skips) { in SkipFromGenerator() argument 24 generator_->Skip(num_skips); in SkipFromGenerator()
|
/external/tensorflow/tensorflow/examples/udacity/ |
D | 5_word2vec.ipynb | 335 "def generate_batch(batch_size, num_skips, skip_window):\n", 337 " assert batch_size % num_skips == 0\n", 338 " assert num_skips <= 2 * skip_window\n", 346 " for i in range(batch_size // num_skips):\n", 349 " for j in range(num_skips):\n", 353 " batch[i * num_skips + j] = buffer[skip_window]\n", 354 " labels[i * num_skips + j, 0] = buffer[target]\n", 361 "for num_skips, skip_window in [(2, 1), (4, 2)]:\n", 363 …" batch, labels = generate_batch(batch_size=8, num_skips=num_skips, skip_window=skip_window)\n", 364 " print('\\nwith num_skips = %d and skip_window = %d:' % (num_skips, skip_window))\n", [all …]
|