Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
6a9038ba
Commit
6a9038ba
authored
Mar 21, 2019
by
Matthew Carrigan
Browse files
Removed an old irrelevant comment
parent
29a392fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
examples/lm_finetuning/pregenerate_training_data.py
examples/lm_finetuning/pregenerate_training_data.py
+1
-5
No files found.
examples/lm_finetuning/pregenerate_training_data.py
View file @
6a9038ba
...
...
@@ -151,11 +151,7 @@ def create_instances_from_document(
is_random_next
=
True
target_b_length
=
target_seq_length
-
len
(
tokens_a
)
# This should rarely go for more than one iteration for large
# corpora. However, just to be careful, we try to make sure that
# the random document is not the same as the document
# we're processing.
# random_document = get_random_doc(all_documents, document, doc_weights)
# Sample a random document, with longer docs being sampled more frequently
random_document
=
doc_database
.
sample_doc
(
current_idx
=
doc_idx
,
sentence_weighted
=
True
)
random_start
=
randint
(
0
,
len
(
random_document
)
-
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment