Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 8dac60f

Browse files
mirkobronziCopybara-Service
authored and
Copybara-Service
committed
internal merge of PR #965
PiperOrigin-RevId: 221694493
1 parent 36e9131 commit 8dac60f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tensor2tensor/utils/beam_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def _is_finished(i, unused_alive_seq, alive_log_probs, unused_finished_seq,
733733
# which means the bound_is_met condition cannot be true in this case.
734734
lowest_score_of_finished_in_finished = tf.reduce_min(finished_scores)
735735
else:
736-
# by taking the max score we only care about the the first beam;
736+
# by taking the max score we only care about the first beam;
737737
# as soon as this first beam cannot be beaten from the alive beams
738738
# the beam decoder can stop.
739739
# similarly to the above, if the top beam is not completed, its

tensor2tensor/utils/beam_search_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def symbols_to_logits(ids):
153153
vocab_size,
154154
0.0,
155155
eos_id=1,
156-
stop_early=True) # defaul value, but just to make this explicit
156+
stop_early=True) # default value, but just to make this explicit
157157

158158
with self.test_session():
159159
ids = final_ids.eval()

0 commit comments

Comments
 (0)