diff --git a/setup.py b/setup.py index 2311b26fa7f..3a726be637b 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ if (sys.version_info.major, sys.version_info.minor) == (3, 6): REQUIRED_PKGS.append('dataclasses') -VIS_REQURE = [ +VIS_REQUIRE = [ 'numpy', 'PILLOW', 'webp', @@ -65,7 +65,7 @@ package_dir={'': 'tools'}, scripts=[], install_requires=REQUIRED_PKGS, - extras_require={'vis': VIS_REQURE}, + extras_require={'vis': VIS_REQUIRE}, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', diff --git a/site/en/guide/advanced_autodiff.ipynb b/site/en/guide/advanced_autodiff.ipynb index 7da53d8ee48..e04b9db4d77 100644 --- a/site/en/guide/advanced_autodiff.ipynb +++ b/site/en/guide/advanced_autodiff.ipynb @@ -1101,7 +1101,7 @@ "id": "M_x7ih5sarvG" }, "source": [ - "In this case, `batch_jacobian` still runs and returns _something_ with the expected shape, but it's contents have an unclear meaning:" + "In this case, `batch_jacobian` still runs and returns _something_ with the expected shape, but its contents have an unclear meaning:" ] }, { diff --git a/site/en/guide/basic_training_loops.ipynb b/site/en/guide/basic_training_loops.ipynb index 74284442cde..a1558b1903e 100644 --- a/site/en/guide/basic_training_loops.ipynb +++ b/site/en/guide/basic_training_loops.ipynb @@ -233,7 +233,7 @@ "id": "rdpN_3ssG9D5" }, "source": [ - "The initial variables are set here in a fixed way, but Keras comes with any of a number of [initalizers](https://www.tensorflow.org/api_docs/python/tf/keras/initializers) you could use, with or without the rest of Keras." + "The initial variables are set here in a fixed way, but Keras comes with any of a number of [initializers](https://www.tensorflow.org/api_docs/python/tf/keras/initializers) you could use, with or without the rest of Keras." ] }, { diff --git a/site/en/guide/data.ipynb b/site/en/guide/data.ipynb index 6421484aafd..e2384ea9989 100644 --- a/site/en/guide/data.ipynb +++ b/site/en/guide/data.ipynb @@ -472,7 +472,7 @@ "\n", "Another common data source that can easily be ingested as a `tf.data.Dataset` is the python generator.\n", "\n", - "Caution: While this is a convienient approach it has limited portability and scalibility. It must run in the same python process that created the generator, and is still subject to the Python [GIL](https://en.wikipedia.org/wiki/Global_interpreter_lock)." + "Caution: While this is a convenient approach it has limited portability and scalability. It must run in the same python process that created the generator, and is still subject to the Python [GIL](https://en.wikipedia.org/wiki/Global_interpreter_lock)." ] }, { @@ -2631,7 +2631,7 @@ "\n", "`data.Dataset.rejection_resample` takes a `class_func` argument. This `class_func` is applied to each dataset element, and is used to determine which class an example belongs to for the purposes of balancing.\n", "\n", - "The goal here is to balance the lable distribution, and the elements of `creditcard_ds` are already `(features, label)` pairs. So the `class_func` just needs to return those labels:" + "The goal here is to balance the label distribution, and the elements of `creditcard_ds` are already `(features, label)` pairs. So the `class_func` just needs to return those labels:" ] }, { diff --git a/site/en/guide/dtensor_overview.ipynb b/site/en/guide/dtensor_overview.ipynb index 39ca1025134..3dcbe06698a 100644 --- a/site/en/guide/dtensor_overview.ipynb +++ b/site/en/guide/dtensor_overview.ipynb @@ -225,7 +225,7 @@ "\n", "Note: In order to avoid confusions between `Mesh` and `Layout`, the term *dimension* is always associated with `Mesh`, and the term *axis* with `Tensor` and `Layout` in this guide.\n", "\n", - "The rank of `Layout` should be the same as the rank of the `Tensor` where the `Layout` is applied. For each of the `Tensor`'s axes the `Layout` may specifiy a mesh dimension to shard the tensor across, or specify the axis as \"unsharded\".\n", + "The rank of `Layout` should be the same as the rank of the `Tensor` where the `Layout` is applied. For each of the `Tensor`'s axes the `Layout` may specify a mesh dimension to shard the tensor across, or specify the axis as \"unsharded\".\n", "The tensor is replicated across any mesh dimensions that it is not sharded across.\n", "\n", "The rank of a `Layout` and the number of dimensions of a `Mesh` do not need to match. The `unsharded` axes of a `Layout` do not need to be associated to a mesh dimension, and `unsharded` mesh dimensions do not need to be associated with a `layout` axis.\n", @@ -528,7 +528,7 @@ "\n", "So far you've worked with the `my_first_dtensor`, which is a rank-1 DTensor fully replicated across a dim-1 `Mesh`.\n", "\n", - "Next create and inspect DTensors that are sharded across a dim-2 `Mesh`. The next example does this with a 3x2 `Mesh` on 6 CPU devices, where size of mesh dimension `'x'` is 3 devices, and and size of mesh dimension`'y'` is 2 devices." + "Next create and inspect DTensors that are sharded across a dim-2 `Mesh`. The next example does this with a 3x2 `Mesh` on 6 CPU devices, where size of mesh dimension `'x'` is 3 devices, and size of mesh dimension`'y'` is 2 devices." ] }, { @@ -696,7 +696,7 @@ "To accomplish this, for each [TensorFlow Graph](https://www.tensorflow.org/guide/intro_to_graphs), DTensor produces and executes an equivalent [SPMD](https://en.wikipedia.org/wiki/SPMD) graph in a procedure called *SPMD expansion*. A few critical steps in DTensor SPMD expansion are:\n", "\n", " - Propagating the sharding `Layout` of DTensor in the TensorFlow graph\n", - " - Rewriting TensorFlow Ops on the global DTensor with equivalent TensorFlow Ops on the componenent tensors, inserting collective and communication Ops when necessary\n", + " - Rewriting TensorFlow Ops on the global DTensor with equivalent TensorFlow Ops on the component tensors, inserting collective and communication Ops when necessary\n", " - Lowering backend neutral TensorFlow Ops to backend specific TensorFlow Ops.\n", "\n", "The final result is that **DTensor is a drop-in replacement for Tensor**.\n", diff --git a/site/en/guide/graph_optimization.ipynb b/site/en/guide/graph_optimization.ipynb index 51de1efda93..fa573e67800 100644 --- a/site/en/guide/graph_optimization.ipynb +++ b/site/en/guide/graph_optimization.ipynb @@ -90,7 +90,7 @@ "* *Constant folding optimizer -* Statically infers the value of tensors when possible by folding constant nodes in the graph and materializes the result using constants.\n", "* *Arithmetic optimizer -* Simplifies arithmetic operations by eliminating common subexpressions and simplifying arithmetic statements. \n", "* *Layout optimizer -* Optimizes tensor layouts to execute data format dependent operations such as convolutions more efficiently.\n", - "* *Remapper optimizer -* Remaps subgraphs onto more efficient implementations by replacing commonly occuring subgraphs with optimized fused monolithic kernels.\n", + "* *Remapper optimizer -* Remaps subgraphs onto more efficient implementations by replacing commonly occurring subgraphs with optimized fused monolithic kernels.\n", "* *Memory optimizer -* Analyzes the graph to inspect the peak memory usage for each operation and inserts CPU-GPU memory copy operations for swapping GPU memory to CPU to reduce the peak memory usage.\n", "* *Dependency optimizer -* Removes or rearranges control dependencies to shorten the critical path for a model step or enables other\n", "optimizations. Also removes nodes that are effectively no-ops such as Identity.\n", diff --git a/site/en/guide/intro_to_graphs.ipynb b/site/en/guide/intro_to_graphs.ipynb index 19b5c5f432e..bcad05b5a33 100644 --- a/site/en/guide/intro_to_graphs.ipynb +++ b/site/en/guide/intro_to_graphs.ipynb @@ -676,7 +676,7 @@ " tf.gather(x, [1]) # unused\n", " return x\n", "\n", - "# Only needed operations are run during graph exection. The error is not raised.\n", + "# Only needed operations are run during graph execution. The error is not raised.\n", "print(unused_return_graph(tf.constant([0.0])))" ] }, diff --git a/site/en/guide/migrate/canned_estimators.ipynb b/site/en/guide/migrate/canned_estimators.ipynb index 66d688b7676..37e9dbe8512 100644 --- a/site/en/guide/migrate/canned_estimators.ipynb +++ b/site/en/guide/migrate/canned_estimators.ipynb @@ -718,7 +718,7 @@ "id": "Z0QYolhoZb_k" }, "source": [ - "Finaly, in the next example, we train and evaluate a CART model." + "Finally, in the next example, we train and evaluate a CART model." ] }, { diff --git a/site/en/guide/migrate/evaluator.ipynb b/site/en/guide/migrate/evaluator.ipynb index 3588838467c..e81863edb81 100644 --- a/site/en/guide/migrate/evaluator.ipynb +++ b/site/en/guide/migrate/evaluator.ipynb @@ -193,7 +193,7 @@ "source": [ "## TensorFlow 2: Evaluating a Keras model\n", "\n", - "In TensorFlow 2, if you use the Keras `Model.fit` API for training, you can evaluate the model with `tf.keras.utils.SidecarEvaluator`. You can also visualize the evaluation metrics in Tensorboard which is not shown in this guide.\n", + "In TensorFlow 2, if you use the Keras `Model.fit` API for training, you can evaluate the model with `tf.keras.utils.SidecarEvaluator`. You can also visualize the evaluation metrics in TensorBoard which is not shown in this guide.\n", "\n", "To help demonstrate this, let's first start by defining and training the model:\n" ] diff --git a/site/en/guide/migrate/migrating_feature_columns.ipynb b/site/en/guide/migrate/migrating_feature_columns.ipynb index 65aa1a786b8..62f91932935 100644 --- a/site/en/guide/migrate/migrating_feature_columns.ipynb +++ b/site/en/guide/migrate/migrating_feature_columns.ipynb @@ -961,7 +961,7 @@ "\n", "\\* `output_mode` can be passed to `layers.CategoryEncoding`, `layers.StringLookup`, `layers.IntegerLookup`, and `layers.TextVectorization`.\n", "\n", - "† `layers.TextVectorization` can handle freeform text input directly (e.g. entire sentences or paragraphs). This is not one-to-one replacement for categorical sequence handling in TF1, but may offer a convinient replacement for ad-hoc text preprocessing.\n", + "† `layers.TextVectorization` can handle freeform text input directly (e.g. entire sentences or paragraphs). This is not one-to-one replacement for categorical sequence handling in TF1, but may offer a convenient replacement for ad-hoc text preprocessing.\n", "\n", "Note: Linear estimators, such as `tf.estimator.LinearClassifier`, can handle direct categorical input (integer indices) without an `embedding_column` or `indicator_column`. However, integer indices cannot be passed directly to `tf.keras.layers.Dense` or `tf.keras.experimental.LinearModel`. These inputs should be first encoded with `tf.layers.CategoryEncoding` with `output_mode='count'` (and `sparse=True` if the category sizes are large) before calling into `Dense` or `LinearModel`." ] diff --git a/site/en/guide/migrate/migration_debugging.ipynb b/site/en/guide/migrate/migration_debugging.ipynb index 774fca2160b..6a2afa27425 100644 --- a/site/en/guide/migrate/migration_debugging.ipynb +++ b/site/en/guide/migrate/migration_debugging.ipynb @@ -486,7 +486,7 @@ "source": [ "Compare numerical equivalence for first few training steps.\n", "\n", - "You can also check the [Validating correctness & numerical equivalence notebook](./validate_correctness.ipynb) for additonal advice for numerical equivalence." + "You can also check the [Validating correctness & numerical equivalence notebook](./validate_correctness.ipynb) for additional advice for numerical equivalence." ] }, { diff --git a/site/en/guide/migrate/tf1_vs_tf2.ipynb b/site/en/guide/migrate/tf1_vs_tf2.ipynb index 80bb11bd530..f4b2cd85b62 100644 --- a/site/en/guide/migrate/tf1_vs_tf2.ipynb +++ b/site/en/guide/migrate/tf1_vs_tf2.ipynb @@ -340,7 +340,7 @@ " print(e) # is out of scope and cannot be used here.\n", "```\n", "\n", - "The most straightfoward solution is ensuring that the variable creation and dataset creation are both outside of the `tf.funciton` call. For example:\n", + "The most straightfoward solution is ensuring that the variable creation and dataset creation are both outside of the `tf.function` call. For example:\n", "\n", "```python\n", "class Model(tf.Module):\n", diff --git a/site/en/guide/migrate/upgrade.ipynb b/site/en/guide/migrate/upgrade.ipynb index 34d00aaf5a7..7223a8c8c81 100644 --- a/site/en/guide/migrate/upgrade.ipynb +++ b/site/en/guide/migrate/upgrade.ipynb @@ -108,7 +108,7 @@ "source": [ "## Recommended upgrade process\n", "\n", - "The rest of this guide demonstrates how to use the symbol-rewriting script. While the script is easy to use, it is strongly recomended that you use the script as part of the following process: \n", + "The rest of this guide demonstrates how to use the symbol-rewriting script. While the script is easy to use, it is strongly recommended that you use the script as part of the following process: \n", "\n", "1. **Unit Test**: Ensure that the code you’re upgrading has a unit test suite with reasonable coverage. This is Python code, so the language won’t protect you from many classes of mistakes. Also ensure that any dependency you have has already been upgraded to be compatible with TensorFlow 2.x.\n", "\n", diff --git a/site/en/guide/ragged_tensor.ipynb b/site/en/guide/ragged_tensor.ipynb index aa4774d4e10..d36010699db 100644 --- a/site/en/guide/ragged_tensor.ipynb +++ b/site/en/guide/ragged_tensor.ipynb @@ -1440,7 +1440,7 @@ "\n", "1. Use `tf.RaggedTensor.to_list` to convert the ragged tensor to a nested Python list.\n", "2. Use `tf.RaggedTensor.numpy` to convert the ragged tensor to a NumPy array whose values are nested NumPy arrays.\n", - "3. Decompose the ragged tensor into its components, using the `tf.RaggedTensor.values` and `tf.RaggedTensor.row_splits` properties, or row-paritioning methods such as `tf.RaggedTensor.row_lengths` and `tf.RaggedTensor.value_rowids`.\n", + "3. Decompose the ragged tensor into its components, using the `tf.RaggedTensor.values` and `tf.RaggedTensor.row_splits` properties, or row-partitioning methods such as `tf.RaggedTensor.row_lengths` and `tf.RaggedTensor.value_rowids`.\n", "4. Use Python indexing to select values from the ragged tensor.\n" ] }, diff --git a/site/en/guide/random_numbers.ipynb b/site/en/guide/random_numbers.ipynb index 37c83ae76a0..5212a10a49a 100644 --- a/site/en/guide/random_numbers.ipynb +++ b/site/en/guide/random_numbers.ipynb @@ -268,7 +268,7 @@ "source": [ "Note: In theory, you can use constructors such as `from_seed` instead of `split` here to obtain a new generator, but by doing so you lose the guarantee that the new generator is independent of the global generator. You will also run the risk that you may accidentally create two generators with the same seed or with seeds that lead to overlapping random-number streams.\n", "\n", - "You can do splitting recursively, calling `split` on splitted generators. There are no limits (barring integer overflow) on the depth of recursions." + "You can do splitting recursively, calling `split` on split generators. There are no limits (barring integer overflow) on the depth of recursions." ] }, { @@ -325,7 +325,7 @@ "source": [ "#### Creating generators inside `tf.function` \n", "\n", - "Creation of generators inside a `tf.function` can only happend during the first run of the function. " + "Creation of generators inside a `tf.function` can only happened during the first run of the function. " ] }, { diff --git a/site/en/r1/guide/autograph.ipynb b/site/en/r1/guide/autograph.ipynb index 5d8d7c97999..f028b33ce9f 100644 --- a/site/en/r1/guide/autograph.ipynb +++ b/site/en/r1/guide/autograph.ipynb @@ -66,7 +66,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/guide/distribute_strategy.ipynb b/site/en/r1/guide/distribute_strategy.ipynb index f6d85912e16..79d6293eba7 100644 --- a/site/en/r1/guide/distribute_strategy.ipynb +++ b/site/en/r1/guide/distribute_strategy.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." @@ -223,7 +223,7 @@ "id": "KY1nJHNkMl7b" }, "source": [ - "This will create a `CentralStorageStrategy` instance which will use all visible GPUs and CPU. Update to variables on replicas will be aggragated before being applied to variables." + "This will create a `CentralStorageStrategy` instance which will use all visible GPUs and CPU. Update to variables on replicas will be aggregated before being applied to variables." ] }, { diff --git a/site/en/r1/guide/eager.ipynb b/site/en/r1/guide/eager.ipynb index 230974ab5a4..6a0a78c2443 100644 --- a/site/en/r1/guide/eager.ipynb +++ b/site/en/r1/guide/eager.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/guide/keras.ipynb b/site/en/r1/guide/keras.ipynb index 08a778b60a5..d722660a59c 100644 --- a/site/en/r1/guide/keras.ipynb +++ b/site/en/r1/guide/keras.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/guide/ragged_tensors.ipynb b/site/en/r1/guide/ragged_tensors.ipynb index 61bce66ecfb..289d29ce82e 100644 --- a/site/en/r1/guide/ragged_tensors.ipynb +++ b/site/en/r1/guide/ragged_tensors.ipynb @@ -57,7 +57,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." @@ -1010,7 +1010,7 @@ " `tf.RaggedTensor.values`\n", " and\n", " `tf.RaggedTensor.row_splits`\n", - " properties, or row-paritioning methods such as `tf.RaggedTensor.row_lengths()`\n", + " properties, or row-partitioning methods such as `tf.RaggedTensor.row_lengths()`\n", " and `tf.RaggedTensor.value_rowids()`." ] }, diff --git a/site/en/r1/tutorials/_index.ipynb b/site/en/r1/tutorials/_index.ipynb index e2fe960d125..eca1450964f 100644 --- a/site/en/r1/tutorials/_index.ipynb +++ b/site/en/r1/tutorials/_index.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/distribute/keras.ipynb b/site/en/r1/tutorials/distribute/keras.ipynb index b8d3c87bfab..6b5258ee5a0 100644 --- a/site/en/r1/tutorials/distribute/keras.ipynb +++ b/site/en/r1/tutorials/distribute/keras.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." @@ -345,7 +345,7 @@ "source": [ "The callbacks used here are:\n", "\n", - "* *Tensorboard*: This callback writes a log for Tensorboard which allows you to visualize the graphs.\n", + "* *TensorBoard*: This callback writes a log for TensorBoard which allows you to visualize the graphs.\n", "* *Model Checkpoint*: This callback saves the model after every epoch.\n", "* *Learning Rate Scheduler*: Using this callback, you can schedule the learning rate to change after every epoch/batch.\n", "\n", diff --git a/site/en/r1/tutorials/distribute/tpu_custom_training.ipynb b/site/en/r1/tutorials/distribute/tpu_custom_training.ipynb index 6d09d2623de..c61f893ca4c 100644 --- a/site/en/r1/tutorials/distribute/tpu_custom_training.ipynb +++ b/site/en/r1/tutorials/distribute/tpu_custom_training.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/distribute/training_loops.ipynb b/site/en/r1/tutorials/distribute/training_loops.ipynb index 1343e8c8b6b..8eb72c13030 100644 --- a/site/en/r1/tutorials/distribute/training_loops.ipynb +++ b/site/en/r1/tutorials/distribute/training_loops.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/eager/automatic_differentiation.ipynb b/site/en/r1/tutorials/eager/automatic_differentiation.ipynb index bbbb689a617..df843bac3b8 100644 --- a/site/en/r1/tutorials/eager/automatic_differentiation.ipynb +++ b/site/en/r1/tutorials/eager/automatic_differentiation.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/eager/custom_layers.ipynb b/site/en/r1/tutorials/eager/custom_layers.ipynb index c82458cb857..954601e371b 100644 --- a/site/en/r1/tutorials/eager/custom_layers.ipynb +++ b/site/en/r1/tutorials/eager/custom_layers.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/eager/custom_training.ipynb b/site/en/r1/tutorials/eager/custom_training.ipynb index 72beefe89ad..f0f7faffa7f 100644 --- a/site/en/r1/tutorials/eager/custom_training.ipynb +++ b/site/en/r1/tutorials/eager/custom_training.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/eager/custom_training_walkthrough.ipynb b/site/en/r1/tutorials/eager/custom_training_walkthrough.ipynb index a4839429827..3989f3e44bc 100644 --- a/site/en/r1/tutorials/eager/custom_training_walkthrough.ipynb +++ b/site/en/r1/tutorials/eager/custom_training_walkthrough.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/eager/eager_basics.ipynb b/site/en/r1/tutorials/eager/eager_basics.ipynb index 90d7c02f18d..acd00ec2e20 100644 --- a/site/en/r1/tutorials/eager/eager_basics.ipynb +++ b/site/en/r1/tutorials/eager/eager_basics.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/images/hub_with_keras.ipynb b/site/en/r1/tutorials/images/hub_with_keras.ipynb index ece9c0fa4a9..5572fd237d9 100644 --- a/site/en/r1/tutorials/images/hub_with_keras.ipynb +++ b/site/en/r1/tutorials/images/hub_with_keras.ipynb @@ -60,7 +60,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/images/transfer_learning.ipynb b/site/en/r1/tutorials/images/transfer_learning.ipynb index c695da4ebb7..25779babd17 100644 --- a/site/en/r1/tutorials/images/transfer_learning.ipynb +++ b/site/en/r1/tutorials/images/transfer_learning.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/keras/basic_classification.ipynb b/site/en/r1/tutorials/keras/basic_classification.ipynb index be7f5e9e8b1..14950538ce4 100644 --- a/site/en/r1/tutorials/keras/basic_classification.ipynb +++ b/site/en/r1/tutorials/keras/basic_classification.ipynb @@ -96,7 +96,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/keras/basic_regression.ipynb b/site/en/r1/tutorials/keras/basic_regression.ipynb index 7d9cb711efa..4bffd62f982 100644 --- a/site/en/r1/tutorials/keras/basic_regression.ipynb +++ b/site/en/r1/tutorials/keras/basic_regression.ipynb @@ -96,7 +96,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/keras/basic_text_classification.ipynb b/site/en/r1/tutorials/keras/basic_text_classification.ipynb index 0303d54d973..5424185bcbd 100644 --- a/site/en/r1/tutorials/keras/basic_text_classification.ipynb +++ b/site/en/r1/tutorials/keras/basic_text_classification.ipynb @@ -96,7 +96,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/keras/overfit_and_underfit.ipynb b/site/en/r1/tutorials/keras/overfit_and_underfit.ipynb index a8f266f9869..8e35b06e556 100644 --- a/site/en/r1/tutorials/keras/overfit_and_underfit.ipynb +++ b/site/en/r1/tutorials/keras/overfit_and_underfit.ipynb @@ -96,7 +96,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/keras/save_and_restore_models.ipynb b/site/en/r1/tutorials/keras/save_and_restore_models.ipynb index 7911e37e139..e9d112bd3f3 100644 --- a/site/en/r1/tutorials/keras/save_and_restore_models.ipynb +++ b/site/en/r1/tutorials/keras/save_and_restore_models.ipynb @@ -96,7 +96,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." @@ -698,7 +698,7 @@ "id": "B7qfpvpY9HCe" }, "source": [ - "Load the the saved model." + "Load the saved model." ] }, { diff --git a/site/en/r1/tutorials/load_data/images.ipynb b/site/en/r1/tutorials/load_data/images.ipynb index dbee204323b..923b95130d1 100644 --- a/site/en/r1/tutorials/load_data/images.ipynb +++ b/site/en/r1/tutorials/load_data/images.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/load_data/tf_records.ipynb b/site/en/r1/tutorials/load_data/tf_records.ipynb index 8b57d3f2f1e..64631cf0eab 100644 --- a/site/en/r1/tutorials/load_data/tf_records.ipynb +++ b/site/en/r1/tutorials/load_data/tf_records.ipynb @@ -57,7 +57,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/non-ml/mandelbrot.ipynb b/site/en/r1/tutorials/non-ml/mandelbrot.ipynb index 88177211896..bca8a142be4 100644 --- a/site/en/r1/tutorials/non-ml/mandelbrot.ipynb +++ b/site/en/r1/tutorials/non-ml/mandelbrot.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/non-ml/pdes.ipynb b/site/en/r1/tutorials/non-ml/pdes.ipynb index d2646daa8da..832fa450523 100644 --- a/site/en/r1/tutorials/non-ml/pdes.ipynb +++ b/site/en/r1/tutorials/non-ml/pdes.ipynb @@ -64,7 +64,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/representation/unicode.ipynb b/site/en/r1/tutorials/representation/unicode.ipynb index 6762a483a42..98aaacff5b9 100644 --- a/site/en/r1/tutorials/representation/unicode.ipynb +++ b/site/en/r1/tutorials/representation/unicode.ipynb @@ -57,7 +57,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/r1/tutorials/sequences/text_generation.ipynb b/site/en/r1/tutorials/sequences/text_generation.ipynb index 423a7f659f0..1350df2a486 100644 --- a/site/en/r1/tutorials/sequences/text_generation.ipynb +++ b/site/en/r1/tutorials/sequences/text_generation.ipynb @@ -65,7 +65,7 @@ "source": [ "> Note: This is an archived TF1 notebook. These are configured\n", "to run in TF2's \n", - "[compatbility mode](https://www.tensorflow.org/guide/migrate)\n", + "[compatibility mode](https://www.tensorflow.org/guide/migrate)\n", "but will run in TF1 as well. To use TF1 in Colab, use the\n", "[%tensorflow_version 1.x](https://colab.research.google.com/notebooks/tensorflow_version.ipynb)\n", "magic." diff --git a/site/en/tutorials/distribute/dtensor_keras_tutorial.ipynb b/site/en/tutorials/distribute/dtensor_keras_tutorial.ipynb index d6bfa26544e..b09348d9264 100644 --- a/site/en/tutorials/distribute/dtensor_keras_tutorial.ipynb +++ b/site/en/tutorials/distribute/dtensor_keras_tutorial.ipynb @@ -180,7 +180,7 @@ "\n", "Data Parallel training is a commonly used parallel training scheme, also used by for example `tf.distribute.MirroredStrategy`.\n", "\n", - "With DTensor, a Data Parallel training loop uses a `Mesh` that consists of a single 'batch' dimension, where each device runs a replica of the model that recieves a shard from the global batch.\n" + "With DTensor, a Data Parallel training loop uses a `Mesh` that consists of a single 'batch' dimension, where each device runs a replica of the model that receives a shard from the global batch.\n" ] }, { diff --git a/site/en/tutorials/distribute/dtensor_ml_tutorial.ipynb b/site/en/tutorials/distribute/dtensor_ml_tutorial.ipynb index 4fdb826afab..4a0f7bd60f6 100644 --- a/site/en/tutorials/distribute/dtensor_ml_tutorial.ipynb +++ b/site/en/tutorials/distribute/dtensor_ml_tutorial.ipynb @@ -514,7 +514,7 @@ "source": [ "## Moving data to the device\n", "\n", - "Usually, `tf.data` iterators (and other data fetching methods) yield tensor objects backed by the local host device memory. This data must be transfered to the accelerator device memory that backs DTensor's component tensors.\n", + "Usually, `tf.data` iterators (and other data fetching methods) yield tensor objects backed by the local host device memory. This data must be transferred to the accelerator device memory that backs DTensor's component tensors.\n", "\n", "`dtensor.copy_to_mesh` is unsuitable for this situation because it replicates input tensors to all devices due to DTensor's global perspective. So in this tutorial, you will use a helper function `repack_local_tensor`, to facilitate the transfer of data. This helper function uses `dtensor.pack` to send (and only send) the shard of the global batch that is intended for a replica to the device backing the replica.\n", "\n", @@ -655,7 +655,7 @@ "\n", "This example uses a Stochastic Gradient Descent optimizer with the Custom Training Loop (CTL). Consult the [Custom Training Loop guide](https://www.tensorflow.org/guide/keras/writing_a_training_loop_from_scratch) and [Walk through](https://www.tensorflow.org/tutorials/customization/custom_training_walkthrough) for more information on those topics.\n", "\n", - "The `train_step` is encapsulated as a `tf.funtion` to indicate this body is to be traced as a TensorFlow Graph. The body of `train_step` consists of a forward inference pass, a backward gradient pass, and the variable update.\n", + "The `train_step` is encapsulated as a `tf.function` to indicate this body is to be traced as a TensorFlow Graph. The body of `train_step` consists of a forward inference pass, a backward gradient pass, and the variable update.\n", "\n", "Note that the body of `train_step` does not contain any special DTensor annotations. Instead, `train_step` only contains high-level TensorFlow operations that process the input `x` and `y` from the global view of the input batch and the model. All of the DTensor annotations (`Mesh`, `Layout`) are factored out of the train step." ] diff --git a/site/en/tutorials/generative/cyclegan.ipynb b/site/en/tutorials/generative/cyclegan.ipynb index 7136dd143ef..4dae5b77791 100644 --- a/site/en/tutorials/generative/cyclegan.ipynb +++ b/site/en/tutorials/generative/cyclegan.ipynb @@ -154,7 +154,7 @@ "This is similar to what was done in [pix2pix](https://www.tensorflow.org/tutorials/generative/pix2pix#load_the_dataset)\n", "\n", "* In random jittering, the image is resized to `286 x 286` and then randomly cropped to `256 x 256`.\n", - "* In random mirroring, the image is randomly flipped horizontally i.e left to right." + "* In random mirroring, the image is randomly flipped horizontally i.e. left to right." ] }, { diff --git a/site/en/tutorials/generative/data_compression.ipynb b/site/en/tutorials/generative/data_compression.ipynb index bd467381e26..974d3f5dc01 100644 --- a/site/en/tutorials/generative/data_compression.ipynb +++ b/site/en/tutorials/generative/data_compression.ipynb @@ -314,7 +314,7 @@ "id": "V8IvuFkrRJIa" }, "source": [ - "To get the latent representation $y$, we need to cast it to `float32`, add a batch dimension, and pass it throught the analysis transform." + "To get the latent representation $y$, we need to cast it to `float32`, add a batch dimension, and pass it through the analysis transform." ] }, { diff --git a/site/en/tutorials/images/transfer_learning.ipynb b/site/en/tutorials/images/transfer_learning.ipynb index 7174ae31693..09f9705a038 100644 --- a/site/en/tutorials/images/transfer_learning.ipynb +++ b/site/en/tutorials/images/transfer_learning.ipynb @@ -1003,7 +1003,7 @@ "id": "PSXH7PRMxOi5" }, "source": [ - "Finaly you can verify the performance of the model on new data using test set." + "Finally you can verify the performance of the model on new data using test set." ] }, { diff --git a/site/en/tutorials/load_data/tfrecord.ipynb b/site/en/tutorials/load_data/tfrecord.ipynb index 27c3c372b35..f5d2ffad878 100644 --- a/site/en/tutorials/load_data/tfrecord.ipynb +++ b/site/en/tutorials/load_data/tfrecord.ipynb @@ -884,7 +884,7 @@ " List[str]]]\n", "```\n", "\n", - "The following code manually converts the `Example` to a dictionary of NumPy arrays, without using TensorFlow Ops. Refer to [the PROTO file](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/example/feature.proto) for detials." + "The following code manually converts the `Example` to a dictionary of NumPy arrays, without using TensorFlow Ops. Refer to [the PROTO file](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/example/feature.proto) for details." ] }, { diff --git a/site/en/tutorials/structured_data/imbalanced_data.ipynb b/site/en/tutorials/structured_data/imbalanced_data.ipynb index ffce3927e0b..4d7e0f22cab 100644 --- a/site/en/tutorials/structured_data/imbalanced_data.ipynb +++ b/site/en/tutorials/structured_data/imbalanced_data.ipynb @@ -234,7 +234,7 @@ "\n", "# The `Amount` column covers a huge range. Convert to log-space.\n", "eps = 0.001 # 0 => 0.1¢\n", - "cleaned_df['Log Ammount'] = np.log(cleaned_df.pop('Amount')+eps)" + "cleaned_df['Log Amount'] = np.log(cleaned_df.pop('Amount')+eps)" ] }, { diff --git a/site/en/tutorials/text/image_captioning.ipynb b/site/en/tutorials/text/image_captioning.ipynb index 8613be7150a..df54e172796 100644 --- a/site/en/tutorials/text/image_captioning.ipynb +++ b/site/en/tutorials/text/image_captioning.ipynb @@ -364,7 +364,7 @@ "You will transform the text captions into integer sequences using the [TextVectorization](https://www.tensorflow.org/api_docs/python/tf/keras/layers/TextVectorization) layer, with the following steps:\n", "\n", "* Use [adapt](https://www.tensorflow.org/api_docs/python/tf/keras/layers/TextVectorization#adapt) to iterate over all captions, split the captions into words, and compute a vocabulary of the top 5,000 words (to save memory).\n", - "* Tokenize all captions by mapping each word to it's index in the vocabulary. All output sequences will be padded to length 50.\n", + "* Tokenize all captions by mapping each word to its index in the vocabulary. All output sequences will be padded to length 50.\n", "* Create word-to-index and index-to-word mappings to display results." ] }, @@ -417,7 +417,7 @@ }, "outputs": [], "source": [ - "# Create mappings for words to indices and indicies to words.\n", + "# Create mappings for words to indices and indices to words.\n", "word_to_index = tf.keras.layers.StringLookup(\n", " mask_token=\"\",\n", " vocabulary=tokenizer.get_vocabulary())\n", diff --git a/site/en/tutorials/text/word2vec.ipynb b/site/en/tutorials/text/word2vec.ipynb index e3de292d653..113b9419662 100644 --- a/site/en/tutorials/text/word2vec.ipynb +++ b/site/en/tutorials/text/word2vec.ipynb @@ -1249,7 +1249,7 @@ "id": "P3MUMrluqNX2" }, "source": [ - "Also define a callback to log training statistics for Tensorboard:" + "Also define a callback to log training statistics for TensorBoard:" ] }, { @@ -1289,7 +1289,7 @@ "id": "wze38jG57XvZ" }, "source": [ - "Tensorboard now shows the word2vec model's accuracy and loss:" + "TensorBoard now shows the word2vec model's accuracy and loss:" ] }, { diff --git a/site/en/tutorials/understanding/sngp.ipynb b/site/en/tutorials/understanding/sngp.ipynb index 7675f69e27f..3df14d852ab 100644 --- a/site/en/tutorials/understanding/sngp.ipynb +++ b/site/en/tutorials/understanding/sngp.ipynb @@ -123,7 +123,7 @@ "\n", "* The predictive uncertainty of a SNGP is computed using the [Laplace approximation](http://www.gaussianprocess.org/gpml/chapters/RW3.pdf). Therefore theoretically, the posterior uncertainty of SNGP is different from that of an exact Gaussian process.\n", "\n", - "* SNGP training needs a covariance reset step at the begining of a new epoch. This can add a tiny amount of extra complexity to a training pipeline. This tutorial shows a simple way to implement this using Keras callbacks." + "* SNGP training needs a covariance reset step at the beginning of a new epoch. This can add a tiny amount of extra complexity to a training pipeline. This tutorial shows a simple way to implement this using Keras callbacks." ] }, { @@ -315,7 +315,7 @@ "plt.scatter(neg_examples[:, 0], neg_examples[:, 1], c=\"#ff7f00\", alpha=0.5)\n", "plt.scatter(ood_examples[:, 0], ood_examples[:, 1], c=\"red\", alpha=0.1)\n", "\n", - "plt.legend([\"Postive\", \"Negative\", \"Out-of-Domain\"])\n", + "plt.legend([\"Positive\", \"Negative\", \"Out-of-Domain\"])\n", "\n", "plt.ylim(DEFAULT_Y_RANGE)\n", "plt.xlim(DEFAULT_X_RANGE)\n", @@ -1008,7 +1008,7 @@ "class ResetCovarianceCallback(tf.keras.callbacks.Callback):\n", "\n", " def on_epoch_begin(self, epoch, logs=None):\n", - " \"\"\"Resets covariance matrix at the begining of the epoch.\"\"\"\n", + " \"\"\"Resets covariance matrix at the beginning of the epoch.\"\"\"\n", " if epoch > 0:\n", " self.model.classifier.reset_covariance_matrix()" ] diff --git a/tools/tensorflow_docs/api_generator/doc_controls.py b/tools/tensorflow_docs/api_generator/doc_controls.py index 5cdeaf6eafc..ead9019553f 100644 --- a/tools/tensorflow_docs/api_generator/doc_controls.py +++ b/tools/tensorflow_docs/api_generator/doc_controls.py @@ -352,8 +352,8 @@ def doc_in_current_and_subclasses(obj: T) -> T: """Overrides `do_not_doc_in_subclasses` decorator. If this decorator is set on a child class's method whose parent's method - contains `do_not_doc_in_subclasses`, then that will be overriden and the - child method will get documented. All classes inherting from the child will + contains `do_not_doc_in_subclasses`, then that will be overridden and the + child method will get documented. All classes inheriting from the child will also document that method. For example: diff --git a/tools/tensorflow_docs/api_generator/doc_generator_visitor.py b/tools/tensorflow_docs/api_generator/doc_generator_visitor.py index fec792095bd..fa7a23c33a8 100644 --- a/tools/tensorflow_docs/api_generator/doc_generator_visitor.py +++ b/tools/tensorflow_docs/api_generator/doc_generator_visitor.py @@ -504,7 +504,7 @@ class ApiTree(Dict[ApiPath, ApiTreeNode]): node = index.node_from_obj(obj) ``` - Remember that `maybe_singelton` (numbers, strings, tuples) classes can't be + Remember that `maybe_singleton` (numbers, strings, tuples) classes can't be looked up this way. To build a tree, nodes must be inserted in tree order starting from the root. diff --git a/tools/tensorflow_docs/api_generator/doc_generator_visitor_test.py b/tools/tensorflow_docs/api_generator/doc_generator_visitor_test.py index f26d954d94b..62b6a25de01 100644 --- a/tools/tensorflow_docs/api_generator/doc_generator_visitor_test.py +++ b/tools/tensorflow_docs/api_generator/doc_generator_visitor_test.py @@ -505,7 +505,7 @@ def test_api_tree(self): # Test lookup by object. self.assertIs(api_tree[('tf', 'Parent')], api_tree.node_for_object(tf.Parent)) - # You can't lookup things that maybe singeltons. + # You can't lookup things that maybe singletons. self.assertIs(api_tree[('tf', 'seven')].py_object, tf.seven) self.assertIsNone(api_tree.node_for_object(tf.seven)) @@ -601,7 +601,7 @@ class Class1: path_tree[('mod', 'b', 'Class1')] = mod.b.Class1 def inconsistent_name_score(path): - # `mod.a` is prefered over `mod.b`, but `b.Class1` is prefered over + # `mod.a` is preferred over `mod.b`, but `b.Class1` is preferred over # `a.Class1`! scores = { ('mod',): 0, diff --git a/tools/tensorflow_docs/api_generator/pretty_docs/module_page.py b/tools/tensorflow_docs/api_generator/pretty_docs/module_page.py index 9141827e1e6..4154eb7a456 100644 --- a/tools/tensorflow_docs/api_generator/pretty_docs/module_page.py +++ b/tools/tensorflow_docs/api_generator/pretty_docs/module_page.py @@ -142,7 +142,7 @@ def collect_docs(self): Mainly this is information about the members of the module. """ - # the path_tree has nodes for all api-paths, not just the prefered paths. + # the path_tree has nodes for all api-paths, not just the preferred paths. module_path_node = self.parser_config.path_tree[self.api_node.path] for (_, path_node) in sorted(module_path_node.children.items()): member_doc = parser.parse_md_docstring(path_node.py_object, diff --git a/tools/tensorflow_docs/api_generator/reference_resolver.py b/tools/tensorflow_docs/api_generator/reference_resolver.py index c124fff9c5a..268d23c97f7 100644 --- a/tools/tensorflow_docs/api_generator/reference_resolver.py +++ b/tools/tensorflow_docs/api_generator/reference_resolver.py @@ -238,7 +238,7 @@ def _create_partial_symbols_dict(self): return new_partial_dict def to_json_file(self, filepath): - """Converts the RefenceResolver to json and writes it to the specified file. + """Converts the ReferenceResolver to json and writes it to the specified file. Args: filepath: The file path to write the json to. diff --git a/tools/tensorflow_docs/tools/nbfmt/__main__.py b/tools/tensorflow_docs/tools/nbfmt/__main__.py index 9fd6b04e6b6..9426e6fd690 100644 --- a/tools/tensorflow_docs/tools/nbfmt/__main__.py +++ b/tools/tensorflow_docs/tools/nbfmt/__main__.py @@ -76,7 +76,7 @@ def clean_notebook(data: Dict[str, Any], nb_source: str, filepath: pathlib.Path, nbjson = json.dumps(data, sort_keys=True, ensure_ascii=False, indent=indent) if not OSS: - # Serialization differences in enviroments. + # Serialization differences in environments. str_replaces = {"<": r"\u003c", ">": r"\u003e", "&": r"\u0026"} for str_from, str_to in str_replaces.items(): nbjson = nbjson.replace(str_from, str_to) @@ -157,7 +157,7 @@ def _clean_metadata_colab(cell_metadata: Dict[str, Any], Remove all `metadata.colab` contents except for `metadata.colab.resources`, if present. The Colab resources are used to embed data within the notebook and - can be treated like output cells (kept unless explictly removed). + can be treated like output cells (kept unless explicitly removed). Args: cell_metadata: object representing the parsed JSON metadata from a cell. diff --git a/tools/tensorflow_docs/tools/nblint/__main__.py b/tools/tensorflow_docs/tools/nblint/__main__.py index 0fbac6f4caa..1411fbf4c7b 100644 --- a/tools/tensorflow_docs/tools/nblint/__main__.py +++ b/tools/tensorflow_docs/tools/nblint/__main__.py @@ -132,7 +132,7 @@ def add_styles(styles, excluded_lints, verbose): getattr(mem[1], "_lint") for mem in inspect.getmembers(mod, is_lint) ] - # Remove lints that have been explictly excluded at the command-line. + # Remove lints that have been explicitly excluded at the command-line. lints = [ lint for lint in lints if f"{style}::{lint.name}" not in excluded_lints ] diff --git a/tools/tensorflow_docs/tools/nblint/linter.py b/tools/tensorflow_docs/tools/nblint/linter.py index b3df30af09a..68be9d7b549 100644 --- a/tools/tensorflow_docs/tools/nblint/linter.py +++ b/tools/tensorflow_docs/tools/nblint/linter.py @@ -94,7 +94,7 @@ def _run_lint(self, lint: decorator.Lint, lint_args: Dict[str, Any], """Run lint and capture any stderr output for the status display. Args: - lint: `decorator.Lint` containg the assertion, scope, and condition. + lint: `decorator.Lint` containing the assertion, scope, and condition. lint_args: Nested dictionary of args to pass the lint callback function. status: The `LinterStatus` to add individual entries for group members. @@ -131,7 +131,7 @@ def _run_lint_group(self, lint: decorator.Lint, lint_args: Dict[str, Any], """Run lint over all cells with scope and return cumulative pass/fail. Args: - lint: `decorator.Lint` containg the assertion, scope, and condition. + lint: `decorator.Lint` containing the assertion, scope, and condition. lint_args: Nested dictionary of args to pass the lint callback function. data: `dict` containing data of entire parse notebook. status: The `LinterStatus` to add individual entries for group members. diff --git a/tools/tensorflow_docs/tools/nblint/style/google.py b/tools/tensorflow_docs/tools/nblint/style/google.py index ef2e56a43ca..7619267c1a0 100644 --- a/tools/tensorflow_docs/tools/nblint/style/google.py +++ b/tools/tensorflow_docs/tools/nblint/style/google.py @@ -14,7 +14,7 @@ # ============================================================================== r"""Lint assertions that adhere to the Google dev docs style guide. -This style module is a non-exhaustive implemention of style rules found in the +This style module is a non-exhaustive implementation of style rules found in the Google developer documentation style guide: https://developers.google.com/style When adding lints, please link to the URL of the relevant style rule. @@ -38,7 +38,7 @@ def search_wordlist(wordlist, src_str): """ found_words = {} for word in wordlist: - # Word-boundary and ignore between path seperator '/'. + # Word-boundary and ignore between path separator '/'. if re.search(rf"[^/]\b{word}\b[^/]", src_str, re.IGNORECASE): alt_word = wordlist[word] if not alt_word: diff --git a/tools/tensorflow_docs/tools/nblint/style/tensorflow.py b/tools/tensorflow_docs/tools/nblint/style/tensorflow.py index c192deabce2..5dd591ac0b1 100644 --- a/tools/tensorflow_docs/tools/nblint/style/tensorflow.py +++ b/tools/tensorflow_docs/tools/nblint/style/tensorflow.py @@ -14,7 +14,7 @@ # ============================================================================== r"""Lint assertions for notebooks published on tensorflow.org. -These lints are a non-exhaustive implemention of style rules found in the +These lints are a non-exhaustive implementation of style rules found in the TensorFlow documentation and style guides. See: - https://www.tensorflow.org/community/contribute/docs