Skip to content

Commit

Permalink
Fix Typos.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599005387
  • Loading branch information
MarkDaoust authored and copybara-github committed Jan 17, 2024
1 parent ad55dbd commit 15f45f8
Show file tree
Hide file tree
Showing 44 changed files with 71 additions and 70 deletions.
2 changes: 1 addition & 1 deletion site/en/community/contribute/docs_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ repository like this:
* <code>\[Basics\]\(../../guide/basics.ipynb\)</code> produces
[Basics](../../guide/basics.ipynb).

This is the prefered approach because this way the links on
This is the preferred approach because this way the links on
[tensorflow.org](https://www.tensorflow.org),
[GitHub](https://github.com/tensorflow/docs){:.external} and
[Colab](https://github.com/tensorflow/docs/tree/master/site/en/guide/bazics.ipynb){:.external}
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@
"The simplest form of batching stacks `n` consecutive elements of a dataset into\n",
"a single element. The `Dataset.batch()` transformation does exactly this, with\n",
"the same constraints as the `tf.stack()` operator, applied to each component\n",
"of the elements: i.e. for each component *i*, all elements must have a tensor\n",
"of the elements: i.e., for each component *i*, all elements must have a tensor\n",
"of the exact same shape."
]
},
Expand Down
4 changes: 2 additions & 2 deletions site/en/guide/dtensor_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
"id": "Eyp_qOSyvieo"
},
"source": [
"<img src=\"https://www.tensorflow.org/images/dtensor/dtensor_layout_rank2.png\" alt=\"A tensorr with it's first axis sharded across mesh dimension 'y' and it's second axis sharded across mesh dimension 'x'\" class=\"no-filter\">\n"
"<img src=\"https://www.tensorflow.org/images/dtensor/dtensor_layout_rank2.png\" alt=\"A tensorr with its first axis sharded across mesh dimension 'y' and it's second axis sharded across mesh dimension 'x'\" class=\"no-filter\">\n"
]
},
{
Expand All @@ -303,7 +303,7 @@
"source": [
"For the same `mesh_2d`, the layout `Layout([\"x\", dtensor.UNSHARDED], mesh_2d)` is a layout for a rank-2 `Tensor` that is replicated across `\"y\"`, and whose first axis is sharded on mesh dimension `x`.\n",
"\n",
"<img src=\"https://www.tensorflow.org/images/dtensor/dtensor_layout_hybrid.png\" alt=\"A tensor replicated across mesh-dimension y, with it's first axis sharded across mesh dimension 'x'\" class=\"no-filter\">\n"
"<img src=\"https://www.tensorflow.org/images/dtensor/dtensor_layout_hybrid.png\" alt=\"A tensor replicated across mesh-dimension y, with its first axis sharded across mesh dimension 'x'\" class=\"no-filter\">\n"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions site/en/guide/migrate/migrating_feature_columns.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -654,17 +654,17 @@
"source": [
"categorical_col = tf1.feature_column.categorical_column_with_identity(\n",
" 'type', num_buckets=one_hot_dims)\n",
"# Convert index to one-hot; e.g. [2] -> [0,0,1].\n",
"# Convert index to one-hot; e.g., [2] -> [0,0,1].\n",
"indicator_col = tf1.feature_column.indicator_column(categorical_col)\n",
"\n",
"# Convert strings to indices; e.g. ['small'] -> [1].\n",
"# Convert strings to indices; e.g., ['small'] -> [1].\n",
"vocab_col = tf1.feature_column.categorical_column_with_vocabulary_list(\n",
" 'size', vocabulary_list=vocab, num_oov_buckets=1)\n",
"# Embed the indices.\n",
"embedding_col = tf1.feature_column.embedding_column(vocab_col, embedding_dims)\n",
"\n",
"normalizer_fn = lambda x: (x - weight_mean) / math.sqrt(weight_variance)\n",
"# Normalize the numeric inputs; e.g. [2.0] -> [0.0].\n",
"# Normalize the numeric inputs; e.g., [2.0] -> [0.0].\n",
"numeric_col = tf1.feature_column.numeric_column(\n",
" 'weight', normalizer_fn=normalizer_fn)\n",
"\n",
Expand Down Expand Up @@ -727,12 +727,12 @@
" 'size': tf.keras.Input(shape=(), dtype='string'),\n",
" 'weight': tf.keras.Input(shape=(), dtype='float32'),\n",
"}\n",
"# Convert index to one-hot; e.g. [2] -> [0,0,1].\n",
"# Convert index to one-hot; e.g., [2] -> [0,0,1].\n",
"type_output = tf.keras.layers.CategoryEncoding(\n",
" one_hot_dims, output_mode='one_hot')(inputs['type'])\n",
"# Convert size strings to indices; e.g. ['small'] -> [1].\n",
"# Convert size strings to indices; e.g., ['small'] -> [1].\n",
"size_output = tf.keras.layers.StringLookup(vocabulary=vocab)(inputs['size'])\n",
"# Normalize the numeric inputs; e.g. [2.0] -> [0.0].\n",
"# Normalize the numeric inputs; e.g., [2.0] -> [0.0].\n",
"weight_output = tf.keras.layers.Normalization(\n",
" axis=None, mean=weight_mean, variance=weight_variance)(inputs['weight'])\n",
"outputs = {\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/migrate/migration_debugging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"\n",
" a. Check training behaviors with TensorBoard\n",
"\n",
" * use simple optimizers e.g. SGD and simple distribution strategies e.g.\n",
" * use simple optimizers e.g., SGD and simple distribution strategies e.g.\n",
" `tf.distribute.OneDeviceStrategy` first\n",
" * training metrics\n",
" * evaluation metrics\n",
Expand Down
4 changes: 2 additions & 2 deletions site/en/guide/profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ first few batches to avoid inaccuracies due to initialization overhead.
An example for profiling multiple workers:
```python
# E.g. your worker IP addresses are 10.0.0.2, 10.0.0.3, 10.0.0.4, and you
# E.g., your worker IP addresses are 10.0.0.2, 10.0.0.3, 10.0.0.4, and you
# would like to profile for a duration of 2 seconds.
tf.profiler.experimental.client.trace(
'grpc://10.0.0.2:8466,grpc://10.0.0.3:8466,grpc://10.0.0.4:8466',
Expand Down Expand Up @@ -845,7 +845,7 @@ more efficient by casting to different data types <b><i>after</i></b> applying
spatial transformations, such as flipping, cropping, rotating, etc.
Note: Some ops like `tf.image.resize` transparently change the `dtype` to
`fp32`. Make sure you normalize your data to lie between `0` and `1` if its not
`fp32`. Make sure you normalize your data to lie between `0` and `1` if it's not
done automatically. Skipping this step could lead to `NaN` errors if you have
enabled [AMP](https://developer.nvidia.com/automatic-mixed-precision).
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/random_numbers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"source": [
"See the *Algorithms* section below for more information about it.\n",
"\n",
"Another way to create a generator is with `Generator.from_non_deterministic_state`. A generator created this way will start from a non-deterministic state, depending on e.g. time and OS."
"Another way to create a generator is with `Generator.from_non_deterministic_state`. A generator created this way will start from a non-deterministic state, depending on e.g., time and OS."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/guide/tf_numpy_type_promotion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@
{
"cell_type": "markdown",
"metadata": {
"id": "7UmunnJ8Tru3"
"id": "7UmunnJ8True3"
},
"source": [
"**First Case**: When `tf.constant` is called with an input with no user-specified dtype."
Expand Down
8 changes: 4 additions & 4 deletions site/en/hub/common_saved_model_apis/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ preprocessor = hub.load("path/to/preprocessor") # Must match `encoder`.
encoder_inputs = preprocessor(text_input)

encoder = hub.load("path/to/encoder")
enocder_outputs = encoder(encoder_inputs)
embeddings = enocder_outputs["default"]
encoder_outputs = encoder(encoder_inputs)
embeddings = encoder_outputs["default"]
```

Recall from the [Reusable SavedModel API](../reusable_saved_models.md) that
Expand Down Expand Up @@ -304,8 +304,8 @@ provisions from the [Reusable SavedModel API](../reusable_saved_models.md).
#### Usage synopsis

```python
enocder = hub.load("path/to/encoder")
enocder_outputs = encoder(encoder_inputs)
encoder = hub.load("path/to/encoder")
encoder_outputs = encoder(encoder_inputs)
```

or equivalently in Keras:
Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tf2_saved_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ and uncompressed SavedModels. For details, see [Caching](caching.md).
SavedModels can be loaded from a specified `handle`, where the `handle` is a
filesystem path, valid TFhub.dev model URL (e.g. "https://tfhub.dev/...").
Kaggle Models URLs mirror TFhub.dev handles in accordance with our Terms and the
license associated with the model assets, e.g. "https://www.kaggle.com/...".
license associated with the model assets, e.g., "https://www.kaggle.com/...".
Handles from Kaggle Models are equivalent to their corresponding TFhub.dev
handle.

Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tutorials/action_recognition_with_tf_hub.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
" return list(_VIDEO_LIST)\n",
"\n",
"def fetch_ucf_video(video):\n",
" \"\"\"Fetchs a video and cache into local filesystem.\"\"\"\n",
" \"\"\"Fetches a video and cache into local filesystem.\"\"\"\n",
" cache_path = os.path.join(_CACHE_DIR, video)\n",
" if not os.path.exists(cache_path):\n",
" urlpath = request.urljoin(UCF_ROOT, video)\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tutorials/cropnet_cassava.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"id": "QT3XWAtR6BRy"
},
"source": [
"The *cassava* dataset has images of cassava leaves with 4 distinct diseases as well as healthy cassava leaves. The model can predict all of these classes as well as sixth class for \"unknown\" when the model is not confident in it's prediction."
"The *cassava* dataset has images of cassava leaves with 4 distinct diseases as well as healthy cassava leaves. The model can predict all of these classes as well as sixth class for \"unknown\" when the model is not confident in its prediction."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
"spanish_sentences = ['perro', 'Los cachorros son agradables.', 'Disfruto de dar largos paseos por la playa con mi perro.']\n",
"\n",
"# Multilingual example\n",
"multilingual_example = [\"Willkommen zu einfachen, aber\", \"verrassend krachtige\", \"multilingüe\", \"compréhension du langage naturel\", \"модели.\", \"大家是什么意思\" , \"보다 중요한\", \".اللغة التي يتحدثونها\"]\n",
"multilingual_example = [\"Willkommen zu einfachen, aber\", \"verrassend krachtige\", \"multilingüe\", \"compréhension du language naturel\", \"модели.\", \"大家是什么意思\" , \"보다 중요한\", \".اللغة التي يتحدثونها\"]\n",
"multilingual_example_in_en = [\"Welcome to simple yet\", \"surprisingly powerful\", \"multilingual\", \"natural language understanding\", \"models.\", \"What people mean\", \"matters more than\", \"the language they speak.\"]\n"
]
},
Expand Down Expand Up @@ -4174,7 +4174,7 @@
"id": "Dxu66S8wJIG9"
},
"source": [
"### Semantic-search crosss-lingual capabilities\n",
"### Semantic-search cross-lingual capabilities\n",
"\n",
"In this section we show how to retrieve sentences related to a set of sample English sentences. Things to try:\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tutorials/image_enhancing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "r_dautO6qbTV"
"id": "r_defaultO6qbTV"
},
"outputs": [],
"source": [
Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tutorials/image_feature_vector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"source": [
"## Train the network\n",
"\n",
"Now that our model is built, let's train it and see how it perfoms on our test set."
"Now that our model is built, let's train it and see how it performs on our test set."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions site/en/hub/tutorials/movenet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"id": "ymTVR2I9x22I"
},
"source": [
"This session demonstrates the minumum working example of running the model on a **single image** to predict the 17 human keypoints."
"This session demonstrates the minimum working example of running the model on a **single image** to predict the 17 human keypoints."
]
},
{
Expand Down Expand Up @@ -697,7 +697,7 @@
" return output_image\n",
"\n",
"def run_inference(movenet, image, crop_region, crop_size):\n",
" \"\"\"Runs model inferece on the cropped region.\n",
" \"\"\"Runs model inference on the cropped region.\n",
"\n",
" The function runs the model inference on the cropped region and updates the\n",
" model output to the original image coordinate system.\n",
Expand Down
4 changes: 2 additions & 2 deletions site/en/hub/tutorials/movinet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@
" steps = video.shape[0]\n",
" # estimate duration of the video (in seconds)\n",
" duration = steps / video_fps\n",
" # estiamte top_k probabilities and corresponding labels\n",
" # estimate top_k probabilities and corresponding labels\n",
" top_probs, top_labels, _ = get_top_k_streaming_labels(probs, k=top_k)\n",
"\n",
" images = []\n",
Expand Down Expand Up @@ -950,7 +950,7 @@
" logits, states = model({**states, 'image': image})\n",
" all_logits.append(logits)\n",
"\n",
"# concatinating all the logits\n",
"# concatenating all the logits\n",
"logits = tf.concat(all_logits, 0)\n",
"# estimating probabilities\n",
"probs = tf.nn.softmax(logits, axis=-1)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"id": "7a2ohPn8vMe2"
},
"source": [
"#Execute a SentEval evaulation task\n",
"#Execute a SentEval evaluation task\n",
"The following code block executes a SentEval task and output the results, choose one of the following tasks to evaluate the USE CMLM model:\n",
"\n",
"```\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tutorials/spice.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "eMUTI4L52ZHA"
"id": "eMULTI4L52ZHA"
},
"outputs": [],
"source": [
Expand Down
4 changes: 2 additions & 2 deletions site/en/hub/tutorials/tf2_object_detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
"id": "yX3pb_pXDjYA"
},
"source": [
"Intalling the Object Detection API"
"Installing the Object Detection API"
]
},
{
Expand Down Expand Up @@ -554,7 +554,7 @@
"\n",
"Among the available object detection models there's Mask R-CNN and the output of this model allows instance segmentation.\n",
"\n",
"To visualize it we will use the same method we did before but adding an aditional parameter: `instance_masks=output_dict.get('detection_masks_reframed', None)`\n"
"To visualize it we will use the same method we did before but adding an additional parameter: `instance_masks=output_dict.get('detection_masks_reframed', None)`\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion site/en/hub/tutorials/tf_hub_generative_image_module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@
"If image is from the module space, the descent is quick and converges to a reasonable sample. Try out descending to an image that is **not from the module space**. The descent will only converge if the image is reasonably close to the space of training images.\n",
"\n",
"How to make it descend faster and to a more realistic image? One can try:\n",
"* using different loss on the image difference, e.g. quadratic,\n",
"* using different loss on the image difference, e.g., quadratic,\n",
"* using different regularizer on the latent vector,\n",
"* initializing from a random vector in multiple runs,\n",
"* etc.\n"
Expand Down
4 changes: 2 additions & 2 deletions site/en/install/source_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ a release branch that is known to work.

## Optional: Environmental Variable Set Up
Run following commands before running build command to avoid issue with package creation:
(If the below commands were set up while installing the packages, please ignore them). Run `set` check if all the paths were set correctly, run `echo %Environmental Variable%` e.g. `echo %BAZEL_VC%` to check path set up for a specific Environmental Variable
(If the below commands were set up while installing the packages, please ignore them). Run `set` check if all the paths were set correctly, run `echo %Environmental Variable%` e.g., `echo %BAZEL_VC%` to check path set up for a specific Environmental Variable

Python path set up issue [tensorflow:issue#59943](https://github.com/tensorflow/tensorflow/issues/59943),[tensorflow:issue#9436](https://github.com/tensorflow/tensorflow/issues/9436),[tensorflow:issue#60083](https://github.com/tensorflow/tensorflow/issues/60083)

Expand Down Expand Up @@ -257,7 +257,7 @@ your platform. Use `pip3 install` to install the package, for example:
<pre class="devsite-terminal tfo-terminal-windows prettyprint lang-bsh">
pip3 install C:/tmp/tensorflow_pkg/tensorflow-<var>version</var>-<var>tags</var>.whl

e.g. pip3 install C:/tmp/tensorflow_pkg/tensorflow-2.12.0-cp310-cp310-win_amd64.whl
e.g., pip3 install C:/tmp/tensorflow_pkg/tensorflow-2.12.0-cp310-cp310-win_amd64.whl
</pre>

Success: TensorFlow is now installed.
Expand Down
4 changes: 2 additions & 2 deletions site/en/r1/guide/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ dataset = dataset.batch(32)
iterator = dataset.make_initializable_iterator()

# You can feed the initializer with the appropriate filenames for the current
# phase of execution, e.g. training vs. validation.
# phase of execution, e.g., training vs. validation.

# Initialize `iterator` with training data.
training_filenames = ["/var/data/file1.tfrecord", "/var/data/file2.tfrecord"]
Expand Down Expand Up @@ -639,7 +639,7 @@ TODO(mrry): Add this section.
The simplest form of batching stacks `n` consecutive elements of a dataset into
a single element. The `Dataset.batch()` transformation does exactly this, with
the same constraints as the `tf.stack()` operator, applied to each component
of the elements: i.e. for each component *i*, all elements must have a tensor
of the elements: i.e., for each component *i*, all elements must have a tensor
of the exact same shape.

```python
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/guide/distribute_strategy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@
},
"source": [
"## Using `tf.distribute.Strategy` with custom training loops\n",
"As you've seen, using `tf.distrbute.Strategy` with high level APIs is only a couple lines of code change. With a little more effort, `tf.distrbute.Strategy` can also be used by other users who are not using these frameworks.\n",
"As you've seen, using `tf.distribute.Strategy` with high level APIs is only a couple lines of code change. With a little more effort, `tf.distribute.Strategy` can also be used by other users who are not using these frameworks.\n",
"\n",
"TensorFlow is used for a wide variety of use cases and some users (such as researchers) require more flexibility and control over their training loops. This makes it hard for them to use the high level frameworks such as Estimator or Keras. For instance, someone using a GAN may want to take a different number of generator or discriminator steps each round. Similarly, the high level frameworks are not very suitable for Reinforcement Learning training. So these users will usually write their own training loops.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion site/en/r1/guide/graph_viz.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ is a snippet from the train and test section of a modification of the
[Estimators MNIST tutorial](../tutorials/estimators/cnn.md), in which we have
recorded summaries and
runtime statistics. See the
[Tensorboard](https://tensorflow.org/tensorboard)
[TensorBoard](https://tensorflow.org/tensorboard)
for details on how to record summaries.
Full source is [here](https://github.com/tensorflow/tensorflow/tree/r1.15/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py).

Expand Down
4 changes: 2 additions & 2 deletions site/en/r1/guide/performance/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tf.Session(config=config)
Intel® has added optimizations to TensorFlow for Intel® Xeon® and Intel® Xeon
Phi™ through the use of the Intel® Math Kernel Library for Deep Neural Networks
(Intel® MKL-DNN) optimized primitives. The optimizations also provide speedups
for the consumer line of processors, e.g. i5 and i7 Intel processors. The Intel
for the consumer line of processors, e.g., i5 and i7 Intel processors. The Intel
published paper
[TensorFlow* Optimizations on Modern Intel® Architecture](https://software.intel.com/en-us/articles/tensorflow-optimizations-on-modern-intel-architecture)
contains additional details on the implementation.
Expand Down Expand Up @@ -255,7 +255,7 @@ bazel build -c opt --copt=-march="broadwell" --config=cuda //tensorflow/tools/pi
a docker container, the data is not cached and the penalty is paid each time
TensorFlow starts. The best practice is to include the
[compute capabilities](http://developer.nvidia.com/cuda-gpus)
of the GPUs that will be used, e.g. P100: 6.0, Titan X (Pascal): 6.1,
of the GPUs that will be used, e.g., P100: 6.0, Titan X (Pascal): 6.1,
Titan X (Maxwell): 5.2, and K80: 3.7.
* Use a version of `gcc` that supports all of the optimizations of the target
CPU. The recommended minimum gcc version is 4.8.3. On macOS, upgrade to the
Expand Down
Loading

0 comments on commit 15f45f8

Please sign in to comment.