We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, May I ask when I read your codes about reader.py, I doubted the function process_dataset, the sample of the maximum contexts:
safe_limit = tf.cast(tf.maximum(num_contexts_per_example, self.config.MAX_CONTEXTS), tf.int32) rand_indices = tf.random_shuffle(tf.range(safe_limit))[:self.config.MAX_CONTEXTS] contexts = tf.gather(all_contexts, rand_indices) # (max_contexts,)
seems will be array out of bounds.
The text was updated successfully, but these errors were encountered:
Hi, There is no array out of bound, because there is padding. Even when there are less than max_contexts, there are paddings instead.
Best, Uri
Sorry, something went wrong.
got it, thanks very much @urialon
No branches or pull requests
Hi,
May I ask when I read your codes about reader.py, I doubted the function process_dataset, the sample of the maximum contexts:
safe_limit = tf.cast(tf.maximum(num_contexts_per_example, self.config.MAX_CONTEXTS), tf.int32)
rand_indices = tf.random_shuffle(tf.range(safe_limit))[:self.config.MAX_CONTEXTS]
contexts = tf.gather(all_contexts, rand_indices) # (max_contexts,)
seems will be array out of bounds.
The text was updated successfully, but these errors were encountered: