Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
1fc6b4f5
Commit
1fc6b4f5
authored
Feb 24, 2021
by
A. Unique TensorFlower
Browse files
Fix comments in wmt_dataloader to match the actual behavior.
PiperOrigin-RevId: 359357110
parent
0c85c06c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
official/nlp/data/wmt_dataloader.py
official/nlp/data/wmt_dataloader.py
+3
-3
No files found.
official/nlp/data/wmt_dataloader.py
View file @
1fc6b4f5
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# ==============================================================================
# ==============================================================================
"""Input pipeline for the transformer model to read, filter, and batch examples.
"""Input pipeline for the transformer model to read, filter, and batch examples.
1.
Batching scheme
Batching scheme
Prior to batching, elements in the dataset are grouped by length (max between
Prior to batching, elements in the dataset are grouped by length (max between
'inputs' and 'targets' length). Each group is then batched such that:
'inputs' and 'targets' length). Each group is then batched such that:
...
@@ -60,8 +60,8 @@ def _create_min_max_boundaries(max_length,
...
@@ -60,8 +60,8 @@ def _create_min_max_boundaries(max_length,
For example, when max_length=24, min_boundary=4 and boundary_scale=2, the
For example, when max_length=24, min_boundary=4 and boundary_scale=2, the
returned values will be:
returned values will be:
buckets_min = [0, 4, 8, 16
, 24
]
buckets_min = [0, 4, 8, 16]
buckets_max = [4, 8, 16,
24,
25]
buckets_max = [4, 8, 16, 25]
Args:
Args:
max_length: The maximum length of example in dataset.
max_length: The maximum length of example in dataset.
...
...
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