Skip to content

Commit c11dea3

Browse files
Fix miscellaneous documentation typos
1 parent d512b28 commit c11dea3

21 files changed

Lines changed: 26 additions & 25 deletions

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ maintain two lists of github tags for contributors:
2828
If you would like propose a new symbol or feature, please first review our
2929
design guide and roadmap linked above, and open an issue to discuss. If you have
3030
a specific design in mind, please include a Colab notebook showing the proposed
31-
design in a end-to-end example. Keep in mind that design for a new feature or
31+
design in an end-to-end example. Keep in mind that design for a new feature or
3232
use case may take longer than contributing to an open issue with a
3333
vetted-design.
3434

STYLE_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ is considered as a common noun and not an abbreviation anymore.
2121
## Naming of Models and Presets
2222

2323
Naming of models and presets is a difficult and important element of our
24-
library usability. In general we try to to follow the branding of "upstream"
24+
library usability. In general we try to follow the branding of "upstream"
2525
model naming, subject to the consistency constraints laid out here.
2626

2727
- The model and preset names should be recognizable to users familiar with the

keras_hub/src/layers/modeling/box_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BoxMatcher(keras.layers.Layer):
3838
Args:
3939
thresholds: A sorted list of floats to classify the matches into
4040
different results (e.g. positive or negative or ignored match). The
41-
list will be prepended with -Inf and and appended with +Inf.
41+
list will be prepended with -Inf and appended with +Inf.
4242
match_values: A list of integers representing matched results (e.g.
4343
positive or negative or ignored match). len(`match_values`) must
4444
equal to len(`thresholds`) + 1.

keras_hub/src/layers/modeling/cached_multi_head_attention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CachedMultiHeadAttention(keras.layers.MultiHeadAttention):
5050
`[B, 2, S, num_heads, key_dims]`, where `S` must agree with the
5151
`attention_mask` shape. This argument is intended for use during
5252
generation to avoid recomputing intermediate state.
53-
cache_update_index: a int or int Tensor, the index at which to update
53+
cache_update_index: an int or int Tensor, the index at which to update
5454
`cache` (usually the index of the current token being processed
5555
when running generation). If `cache_update_index=None` while `cache`
5656
is set, the cache will not be updated.

keras_hub/src/layers/modeling/rotary_embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def call(self, inputs, start_index=0, positions=None):
164164

165165
def _apply_rotary_pos_emb(self, tensor, cos_emb, sin_emb):
166166
x1, x2 = ops.split(tensor, 2, axis=-1)
167-
# Avoid `ops.concatenate` for now, to avoid a obscure bug with XLA
167+
# Avoid `ops.concatenate` for now, to avoid an obscure bug with XLA
168168
# compilation on jax. We should be able to remove this once the
169169
# following PR is in all jax releases we care about:
170170
# https://github.com/openxla/xla/pull/7875

keras_hub/src/models/deit/deit_image_classifier.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ class DeiTImageClassifier(ImageClassifier):
2020
`num_classes` argument, controlling the number of predicted output classes.
2121
2222
To fine-tune with `fit()`, pass a dataset containing tuples of `(x, y)`
23-
labels where `x` is a string and `y` is a integer from `[0, num_classes)`.
23+
labels where `x` is a string and `y` is an integer from `[0, num_classes)`.
2424
25-
Not that unlike `keras_hub.model.ImageClassifier`, the `DeiTImageClassifier`
26-
we pluck out `cls_token` which is first seqence from the backbone.
25+
Note that unlike `keras_hub.model.ImageClassifier`, the
26+
`DeiTImageClassifier` we pluck out `cls_token` which is first seqence from
27+
the backbone.
2728
2829
Args:
2930
backbone: A `keras_hub.models.DeiTBackbone` instance or a `keras.Model`.

keras_hub/src/models/depth_estimator_preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class DepthEstimatorPreprocessor(Preprocessor):
1616
1717
All `DepthEstimatorPreprocessor` take inputs three inputs, `x`, `y`, and
1818
`sample_weight`. `x`, the first input, should always be included. It can
19-
be a image or batch of images. See examples below. `y` and `sample_weight`
19+
be an image or batch of images. See examples below. `y` and `sample_weight`
2020
are optional inputs that will be passed through unaltered. Usually, `y` will
2121
be the depths, and `sample_weight` will not be provided.
2222

keras_hub/src/models/flux/flux_text_to_image_preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FluxTextToImagePreprocessor(Preprocessor):
1818
1919
Args:
2020
clip_l_preprocessor: A `keras_hub.models.CLIPPreprocessor` instance.
21-
t5_preprocessor: A optional `keras_hub.models.T5Preprocessor` instance.
21+
t5_preprocessor: An optional `keras_hub.models.T5Preprocessor` instance.
2222
"""
2323

2424
backbone_cls = FluxBackbone

keras_hub/src/models/image_classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ImageClassifier(Task):
1414
`num_classes` argument, controlling the number of predicted output classes.
1515
1616
To fine-tune with `fit()`, pass a dataset containing tuples of `(x, y)`
17-
labels where `x` is a string and `y` is a integer from `[0, num_classes)`.
17+
labels where `x` is a string and `y` is an integer from `[0, num_classes)`.
1818
All `ImageClassifier` tasks include a `from_preset()` constructor which can
1919
be used to load a pre-trained config and weights.
2020

keras_hub/src/models/image_classifier_preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ImageClassifierPreprocessor(Preprocessor):
1616
1717
All `ImageClassifierPreprocessor` take inputs three inputs, `x`, `y`, and
1818
`sample_weight`. `x`, the first input, should always be included. It can
19-
be a image or batch of images. See examples below. `y` and `sample_weight`
19+
be an image or batch of images. See examples below. `y` and `sample_weight`
2020
are optional inputs that will be passed through unaltered. Usually, `y` will
2121
be the classification label, and `sample_weight` will not be provided.
2222

0 commit comments

Comments
 (0)