Skip to content
New issue

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

Fixed typos in model doc #11123

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion official/nlp/modeling/ops/beam_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def _gather_beams(nested, beam_indices, batch_size, new_beam_size):
Nested structure containing tensors with shape
[batch_size, new_beam_size, ...]
"""
# Computes the i'th coodinate that contains the batch index for gather_nd.
# Computes the i'th coordinate that contains the batch index for gather_nd.
# Batch pos is a tensor like [[0,0,0,0,],[1,1,1,1],..].
batch_pos = tf.range(batch_size * new_beam_size) // new_beam_size
batch_pos = tf.reshape(batch_pos, [batch_size, new_beam_size])
Expand Down
6 changes: 3 additions & 3 deletions official/nlp/modeling/ops/segment_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _get_random(positions, random_fn):
return positions.with_flat_values(flat_random)


# For every position j in a row, sample a position preceeding j or
# For every position j in a row, sample a position preceding j or
# a position which is [0, j-1]
def _random_int_up_to(maxval, random_fn):
# Need to cast because the int kernel for uniform doesn't support bcast.
Expand Down Expand Up @@ -87,10 +87,10 @@ def get_sentence_order_labels(sentences,
dtype.
random_threshold: (optional) A float threshold between 0 and 1, used to
determine whether to extract a random, out-of-batch sentence or a
suceeding sentence. Higher value favors succeeding sentence.
succeeding sentence. Higher value favors succeeding sentence.
random_next_threshold: (optional) A float threshold between 0 and 1, used to
determine whether to extract either a random, out-of-batch, or succeeding
sentence or a preceeding sentence. Higher value favors preceeding
sentence or a preceding sentence. Higher value favors preceding
sentences.
random_fn: (optional) An op used to generate random float values.

Expand Down