From a0901ae6c9e960e5e88750ccb329196867c46bf8 Mon Sep 17 00:00:00 2001 From: Amit Aharoni Date: Fri, 25 Aug 2023 16:20:05 +0200 Subject: [PATCH 01/41] Keras basic text classification tutorial: removed +1 from embeddings input dimensions --- site/en/tutorials/keras/text_classification.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/tutorials/keras/text_classification.ipynb b/site/en/tutorials/keras/text_classification.ipynb index 4182c3f295f..f14964207ff 100644 --- a/site/en/tutorials/keras/text_classification.ipynb +++ b/site/en/tutorials/keras/text_classification.ipynb @@ -631,7 +631,7 @@ "outputs": [], "source": [ "model = tf.keras.Sequential([\n", - " layers.Embedding(max_features + 1, embedding_dim),\n", + " layers.Embedding(max_features, embedding_dim),\n", " layers.Dropout(0.2),\n", " layers.GlobalAveragePooling1D(),\n", " layers.Dropout(0.2),\n", From 53f3748426001e4be9923a25f9f3394707f4e206 Mon Sep 17 00:00:00 2001 From: Susheel Thapa Date: Fri, 20 Oct 2023 06:35:15 +0545 Subject: [PATCH 02/41] Chore: Fix the typo in multiple files --- site/en/community/contribute/docs_style.md | 2 +- site/en/guide/migrate/evaluator.ipynb | 2 +- site/en/guide/sparse_tensor.ipynb | 7 ++++++- site/en/guide/tf_numpy_type_promotion.ipynb | 5 +++-- site/en/hub/tutorials/boundless.ipynb | 2 +- site/en/hub/tutorials/s3gan_generation_with_tf_hub.ipynb | 2 +- site/en/hub/tutorials/tf2_object_detection.ipynb | 2 +- site/en/hub/tutorials/wiki40b_lm.ipynb | 2 +- site/en/r1/guide/autograph.ipynb | 2 +- site/en/r1/guide/distribute_strategy.ipynb | 6 +++--- site/en/r1/tutorials/representation/unicode.ipynb | 4 ++-- 11 files changed, 21 insertions(+), 15 deletions(-) diff --git a/site/en/community/contribute/docs_style.md b/site/en/community/contribute/docs_style.md index eba78afa896..d4e42cb5235 100644 --- a/site/en/community/contribute/docs_style.md +++ b/site/en/community/contribute/docs_style.md @@ -63,7 +63,7 @@ repository like this: * \[Basics\]\(../../guide/basics.ipynb\) 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} diff --git a/site/en/guide/migrate/evaluator.ipynb b/site/en/guide/migrate/evaluator.ipynb index fd8bd12d1e1..c8f848e4406 100644 --- a/site/en/guide/migrate/evaluator.ipynb +++ b/site/en/guide/migrate/evaluator.ipynb @@ -122,7 +122,7 @@ "\n", "In TensorFlow 1, you can configure a `tf.estimator` to evaluate the estimator using `tf.estimator.train_and_evaluate`.\n", "\n", - "In this example, start by defining the `tf.estimator.Estimator` and speciyfing training and evaluation specifications:" + "In this example, start by defining the `tf.estimator.Estimator` and specifying training and evaluation specifications:" ] }, { diff --git a/site/en/guide/sparse_tensor.ipynb b/site/en/guide/sparse_tensor.ipynb index cd38fdf55ab..407561ec6f5 100644 --- a/site/en/guide/sparse_tensor.ipynb +++ b/site/en/guide/sparse_tensor.ipynb @@ -31,6 +31,11 @@ "# limitations under the License." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, { "cell_type": "markdown", "metadata": { @@ -620,7 +625,7 @@ "\n", "However, there are a few cases where it can be useful to distinguish zero values from missing values. In particular, this allows for one way to encode missing/unknown data in your training data. For example, consider a use case where you have a tensor of scores (that can have any floating point value from -Inf to +Inf), with some missing scores. You can encode this tensor using a sparse tensor where the explicit zeros are known zero scores but the implicit zero values actually represent missing data and not zero. \n", "\n", - "Note: This is generally not the intended usage of `tf.sparse.SparseTensor`s; and you might want to also consier other techniques for encoding this such as for example using a separate mask tensor that identifies the locations of known/unknown values. However, exercise caution while using this approach, since most sparse operations will treat explicit and implicit zero values identically." + "Note: This is generally not the intended usage of `tf.sparse.SparseTensor`s; and you might want to also consider other techniques for encoding this such as for example using a separate mask tensor that identifies the locations of known/unknown values. However, exercise caution while using this approach, since most sparse operations will treat explicit and implicit zero values identically." ] }, { diff --git a/site/en/guide/tf_numpy_type_promotion.ipynb b/site/en/guide/tf_numpy_type_promotion.ipynb index a9e176c5db6..51bea78914f 100644 --- a/site/en/guide/tf_numpy_type_promotion.ipynb +++ b/site/en/guide/tf_numpy_type_promotion.ipynb @@ -178,7 +178,8 @@ "* `f32*` means Python `float` or weakly-typed `f32`\n", "* `c128*` means Python `complex` or weakly-typed `c128`\n", "\n", - "The asterik (*) denotes that the corresponding type is “weak” - such a dtype is temporarily inferred by the system, and could defer to other dtypes. This concept is explained more in detail [here](#weak_tensor)." + "The asterisk\n", + " (*) denotes that the corresponding type is “weak” - such a dtype is temporarily inferred by the system, and could defer to other dtypes. This concept is explained more in detail [here](#weak_tensor)." ] }, { @@ -449,7 +450,7 @@ "source": [ "### WeakTensor Construction\n", "\n", - "WeakTensors are created if you create a tensor without specifing a dtype the result is a WeakTensor. You can check whether a Tensor is \"weak\" or not by checking the weak attribute at the end of the Tensor's string representation." + "WeakTensors are created if you create a tensor without specifying a dtype the result is a WeakTensor. You can check whether a Tensor is \"weak\" or not by checking the weak attribute at the end of the Tensor's string representation." ] }, { diff --git a/site/en/hub/tutorials/boundless.ipynb b/site/en/hub/tutorials/boundless.ipynb index 570e9413362..4697a810bb8 100644 --- a/site/en/hub/tutorials/boundless.ipynb +++ b/site/en/hub/tutorials/boundless.ipynb @@ -271,7 +271,7 @@ "* The input image with a mask applied\n", "* The masked image with the extrapolation to complete it\n", "\n", - "we can use these two images to show a comparisson visualization." + "we can use these two images to show a comparison visualization." ] }, { diff --git a/site/en/hub/tutorials/s3gan_generation_with_tf_hub.ipynb b/site/en/hub/tutorials/s3gan_generation_with_tf_hub.ipynb index d8efd802ae0..bd73cffebdf 100644 --- a/site/en/hub/tutorials/s3gan_generation_with_tf_hub.ipynb +++ b/site/en/hub/tutorials/s3gan_generation_with_tf_hub.ipynb @@ -86,7 +86,7 @@ "2. Click **Runtime > Run all** to run each cell in order.\n", " * Afterwards, the interactive visualizations should update automatically when you modify the settings using the sliders and dropdown menus.\n", "\n", - "Note: if you run into any issues, youn can try restarting the runtime and rerunning all cells from scratch by clicking **Runtime > Restart and run all...**.\n", + "Note: if you run into any issues, you can try restarting the runtime and rerunning all cells from scratch by clicking **Runtime > Restart and run all...**.\n", "\n", "[1] Mario Lucic\\*, Michael Tschannen\\*, Marvin Ritter\\*, Xiaohua Zhai, Olivier\n", " Bachem, Sylvain Gelly, [High-Fidelity Image Generation With Fewer Labels](https://arxiv.org/abs/1903.02271), ICML 2019." diff --git a/site/en/hub/tutorials/tf2_object_detection.ipynb b/site/en/hub/tutorials/tf2_object_detection.ipynb index 38b162068d9..3793ad20485 100644 --- a/site/en/hub/tutorials/tf2_object_detection.ipynb +++ b/site/en/hub/tutorials/tf2_object_detection.ipynb @@ -291,7 +291,7 @@ "id": "yX3pb_pXDjYA" }, "source": [ - "Intalling the Object Detection API" + "Installing the Object Detection API" ] }, { diff --git a/site/en/hub/tutorials/wiki40b_lm.ipynb b/site/en/hub/tutorials/wiki40b_lm.ipynb index e696160faca..ad94ce0aab8 100644 --- a/site/en/hub/tutorials/wiki40b_lm.ipynb +++ b/site/en/hub/tutorials/wiki40b_lm.ipynb @@ -214,7 +214,7 @@ " # Generate the tokens from the language model\n", " generation_outputs = module(generation_input_dict, signature=\"prediction\", as_dict=True)\n", "\n", - " # Get the probablities and the inputs for the next steps\n", + " # Get the probabilities and the inputs for the next steps\n", " probs = generation_outputs[\"probs\"]\n", " new_mems = [generation_outputs[\"new_mem_{}\".format(i)] for i in range(n_layer)]\n", "\n", diff --git a/site/en/r1/guide/autograph.ipynb b/site/en/r1/guide/autograph.ipynb index f028b33ce9f..790dbb49df1 100644 --- a/site/en/r1/guide/autograph.ipynb +++ b/site/en/r1/guide/autograph.ipynb @@ -241,7 +241,7 @@ "id": "m-jWmsCmByyw" }, "source": [ - "AutoGraph supports common Python statements like `while`, `for`, `if`, `break`, and `return`, with support for nesting. Compare this function with the complicated graph verson displayed in the following code blocks:" + "AutoGraph supports common Python statements like `while`, `for`, `if`, `break`, and `return`, with support for nesting. Compare this function with the complicated graph version displayed in the following code blocks:" ] }, { diff --git a/site/en/r1/guide/distribute_strategy.ipynb b/site/en/r1/guide/distribute_strategy.ipynb index 79d6293eba7..cc51259b78e 100644 --- a/site/en/r1/guide/distribute_strategy.ipynb +++ b/site/en/r1/guide/distribute_strategy.ipynb @@ -118,7 +118,7 @@ "## Types of strategies\n", "`tf.distribute.Strategy` intends to cover a number of use cases along different axes. Some of these combinations are currently supported and others will be added in the future. Some of these axes are:\n", "\n", - "* Syncronous vs asynchronous training: These are two common ways of distributing training with data parallelism. In sync training, all workers train over different slices of input data in sync, and aggregating gradients at each step. In async training, all workers are independently training over the input data and updating variables asynchronously. Typically sync training is supported via all-reduce and async through parameter server architecture.\n", + "* Synchronous vs asynchronous training: These are two common ways of distributing training with data parallelism. In sync training, all workers train over different slices of input data in sync, and aggregating gradients at each step. In async training, all workers are independently training over the input data and updating variables asynchronously. Typically sync training is supported via all-reduce and async through parameter server architecture.\n", "* Hardware platform: Users may want to scale their training onto multiple GPUs on one machine, or multiple machines in a network (with 0 or more GPUs each), or on Cloud TPUs.\n", "\n", "In order to support these use cases, we have 4 strategies available. In the next section we will talk about which of these are supported in which scenarios in TF." @@ -371,7 +371,7 @@ "id": "hQv1lm9UPDFy" }, "source": [ - "So far we've talked about what are the different stategies available and how you can instantiate them. In the next few sections, we will talk about the different ways in which you can use them to distribute your training. We will show short code snippets in this guide and link off to full tutorials which you can run end to end." + "So far we've talked about what are the different strategies available and how you can instantiate them. In the next few sections, we will talk about the different ways in which you can use them to distribute your training. We will show short code snippets in this guide and link off to full tutorials which you can run end to end." ] }, { @@ -595,7 +595,7 @@ "### Examples and Tutorials\n", "Here are some examples that show end to end usage of various strategies with Estimator:\n", "\n", - "1. [End to end example](https://github.com/tensorflow/ecosystem/tree/master/distribution_strategy) for multi worker training in tensorflow/ecosystem using Kuberentes templates. This example starts with a Keras model and converts it to an Estimator using the `tf.keras.estimator.model_to_estimator` API.\n", + "1. [End to end example](https://github.com/tensorflow/ecosystem/tree/master/distribution_strategy) for multi worker training in tensorflow/ecosystem using Kubernetes templates. This example starts with a Keras model and converts it to an Estimator using the `tf.keras.estimator.model_to_estimator` API.\n", "2. Official [ResNet50](https://github.com/tensorflow/models/blob/master/official/r1/resnet/imagenet_main.py) model, which can be trained using either `MirroredStrategy` or `MultiWorkerMirroredStrategy`.\n", "3. [ResNet50](https://github.com/tensorflow/tpu/blob/master/models/experimental/distribution_strategy/resnet_estimator.py) example with TPUStrategy." ] diff --git a/site/en/r1/tutorials/representation/unicode.ipynb b/site/en/r1/tutorials/representation/unicode.ipynb index 98aaacff5b9..301a64d72fc 100644 --- a/site/en/r1/tutorials/representation/unicode.ipynb +++ b/site/en/r1/tutorials/representation/unicode.ipynb @@ -136,7 +136,7 @@ "id": "jsMPnjb6UDJ1" }, "source": [ - "Note: When using python to construct strings, the handling of unicode differs betweeen v2 and v3. In v2, unicode strings are indicated by the \"u\" prefix, as above. In v3, strings are unicode-encoded by default." + "Note: When using python to construct strings, the handling of unicode differs between v2 and v3. In v2, unicode strings are indicated by the \"u\" prefix, as above. In v3, strings are unicode-encoded by default." ] }, { @@ -587,7 +587,7 @@ "id": "CapnbShuGU8i" }, "source": [ - "First, we decode the sentences into character codepoints, and find the script identifeir for each character." + "First, we decode the sentences into character codepoints, and find the script identifier for each character." ] }, { From dadf8c3b56e7b650a7396b251995caad5122d96f Mon Sep 17 00:00:00 2001 From: Hussnain <36568694+husszaf@users.noreply.github.com> Date: Sun, 22 Oct 2023 23:20:31 +0100 Subject: [PATCH 03/41] Typo fix in boundless.ipynb In the boundless.ipynb file in the section: "Loading an image" there is a typo in the description: "We will load a sample image but fell free to upload your own image to the colab and try with it." but it should be "We will load a sample image but feel free to upload your own image to the colab and try with it." the change is from "fell" to the corrected "feel" --- site/en/hub/tutorials/boundless.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/hub/tutorials/boundless.ipynb b/site/en/hub/tutorials/boundless.ipynb index 570e9413362..7aec68190de 100644 --- a/site/en/hub/tutorials/boundless.ipynb +++ b/site/en/hub/tutorials/boundless.ipynb @@ -185,7 +185,7 @@ "source": [ "## Loading an Image\n", "\n", - "We will load a sample image but fell free to upload your own image to the colab and try with it. Remember that the model have some limitations regarding human images." + "We will load a sample image but feel free to upload your own image to the colab and try with it. Remember that the model have some limitations regarding human images." ] }, { From 4d108a9ddb0ac6ffcc7cc2b1d558be6ae92abf3a Mon Sep 17 00:00:00 2001 From: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:09:21 +0000 Subject: [PATCH 04/41] Update site/en/hub/tutorials/boundless.ipynb --- site/en/hub/tutorials/boundless.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/hub/tutorials/boundless.ipynb b/site/en/hub/tutorials/boundless.ipynb index 7aec68190de..50ae2a5cfec 100644 --- a/site/en/hub/tutorials/boundless.ipynb +++ b/site/en/hub/tutorials/boundless.ipynb @@ -185,7 +185,7 @@ "source": [ "## Loading an Image\n", "\n", - "We will load a sample image but feel free to upload your own image to the colab and try with it. Remember that the model have some limitations regarding human images." + "You will load a sample image but feel free to upload your own image to the Colab notebook. Remember that the model may have some limitations regarding human images." ] }, { From 57e7adb5be0b912a6efa4b9f1e81694e616d0c87 Mon Sep 17 00:00:00 2001 From: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:12:40 +0000 Subject: [PATCH 05/41] Update site/en/guide/tf_numpy_type_promotion.ipynb --- site/en/guide/tf_numpy_type_promotion.ipynb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/en/guide/tf_numpy_type_promotion.ipynb b/site/en/guide/tf_numpy_type_promotion.ipynb index 51bea78914f..1b0f6d116c8 100644 --- a/site/en/guide/tf_numpy_type_promotion.ipynb +++ b/site/en/guide/tf_numpy_type_promotion.ipynb @@ -178,8 +178,7 @@ "* `f32*` means Python `float` or weakly-typed `f32`\n", "* `c128*` means Python `complex` or weakly-typed `c128`\n", "\n", - "The asterisk\n", - " (*) denotes that the corresponding type is “weak” - such a dtype is temporarily inferred by the system, and could defer to other dtypes. This concept is explained more in detail [here](#weak_tensor)." + "The asterisk (*) denotes that the corresponding type is “weak” - such a dtype is temporarily inferred by the system, and could defer to other dtypes. This concept is explained more in detail [here](#weak_tensor)." ] }, { From 979d7480cf78f977d876395aaba2ac5b29a4140d Mon Sep 17 00:00:00 2001 From: bmolynea-google <44415779+bmolynea-google@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:58:46 -0700 Subject: [PATCH 06/41] Correct link to list of dtypes --- site/en/guide/tensor.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/guide/tensor.ipynb b/site/en/guide/tensor.ipynb index cda73f04574..b9b72973db1 100644 --- a/site/en/guide/tensor.ipynb +++ b/site/en/guide/tensor.ipynb @@ -80,7 +80,7 @@ "id": "VQ3s2J8Vgowq" }, "source": [ - "Tensors are multi-dimensional arrays with a uniform type (called a `dtype`). You can see all supported `dtypes` at `tf.dtypes.DType`.\n", + "Tensors are multi-dimensional arrays with a uniform type (called a `dtype`). You can see all supported `dtypes` at `tf.dtypes`.\n", "\n", "If you're familiar with [NumPy](https://numpy.org/devdocs/user/quickstart.html){:.external}, tensors are (kind of) like `np.arrays`.\n", "\n", From d3ee98312cb767e6ef3f055919db010bd6d72b8d Mon Sep 17 00:00:00 2001 From: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:56:35 +0000 Subject: [PATCH 07/41] Update parser.py, add URL substring sanitization --- tools/tensorflow_docs/api_generator/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tensorflow_docs/api_generator/parser.py b/tools/tensorflow_docs/api_generator/parser.py index 809d2f0ce3a..7ea1d37e7fb 100644 --- a/tools/tensorflow_docs/api_generator/parser.py +++ b/tools/tensorflow_docs/api_generator/parser.py @@ -685,7 +685,7 @@ class FileLocation(object): @property def url(self) -> Optional[str]: if self.start_line and self.end_line: - if 'github.com' in self.base_url: + if self.base_url.startswith('https://github.com'): return f'{self.base_url}#L{self.start_line}-L{self.end_line}' return self.base_url From c3a528be5fb626bf8e9455ee89a3e7ac5df3af12 Mon Sep 17 00:00:00 2001 From: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:05:59 +0000 Subject: [PATCH 08/41] Update parser.py, add URL substring sanitization --- tools/tensorflow_docs/api_generator/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tensorflow_docs/api_generator/parser.py b/tools/tensorflow_docs/api_generator/parser.py index 7ea1d37e7fb..84b7533d08b 100644 --- a/tools/tensorflow_docs/api_generator/parser.py +++ b/tools/tensorflow_docs/api_generator/parser.py @@ -685,7 +685,7 @@ class FileLocation(object): @property def url(self) -> Optional[str]: if self.start_line and self.end_line: - if self.base_url.startswith('https://github.com'): + if self.base_url.startswith('https://github.com/'): return f'{self.base_url}#L{self.start_line}-L{self.end_line}' return self.base_url From 9eb9b9d08ab5256e5a4e1d290a1bddfb2f4588fe Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Thu, 26 Oct 2023 11:40:06 -0700 Subject: [PATCH 09/41] Remove broken workflow. --- .github/workflows/bot-pr-fix.yaml | 54 ------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/bot-pr-fix.yaml diff --git a/.github/workflows/bot-pr-fix.yaml b/.github/workflows/bot-pr-fix.yaml deleted file mode 100644 index 313ecea74c6..00000000000 --- a/.github/workflows/bot-pr-fix.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Automatically add commits to fix pull requests. This workflow must initiate -# from an authenticated bot repo collaborator. Check for opt-out label. -# Webhook events: Pull requests -name: Auto-fix pull request -on: - repository_dispatch: - types: [opened, synchronize] - -permissions: {} - -jobs: - nbfmt: - # Check for opt-out label. - permissions: - contents: write - pull-requests: write - - if: >- - ${{ github.actor == 'tfdocsbot' && - !contains(github.event.client_payload.pull_request.labels.*.name, 'nbfmt-disable') }} - runs-on: ubuntu-latest - steps: - - name: Set up Python - uses: actions/setup-python@v2 - - name: Install tensorflow-docs - run: python3 -m pip install -U git+https://github.com/tensorflow/docs - - name: Fetch pull request branch - uses: actions/checkout@v2 - with: - # Head repo is the user's fork. Ref is the branch name. - repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} - ref: ${{ github.event.client_payload.pull_request.head.sha }} - - name: Fetch base master branch - run: git fetch -u "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" master:master - - name: Format notebooks - run: | - # Only want notebooks modified in this pull request. - readarray -t changed_files < <(git diff --name-only master | grep '\.ipynb$' || true) - if [[ ${#changed_files[@]} == 0 ]]; then - echo "No notebooks modified in this pull request." - exit 0 - fi - python3 -m tensorflow_docs.tools.nbfmt "${changed_files[@]}" - - if [[ -z $(git ls-files --modified) ]]; then - echo "Notebooks already formatted." - exit 0 - fi - # Set author and commit. - git config --global user.name "$GITHUB_ACTOR" - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git commit -am "nbfmt" - # Push to the pull request branch submitted by head. - git push From a5bd148929e7f589be3175c0898159b09ad1936a Mon Sep 17 00:00:00 2001 From: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:46:30 +0000 Subject: [PATCH 10/41] Update parser.py, add URL substring sanitization --- tools/tensorflow_docs/api_generator/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tensorflow_docs/api_generator/parser.py b/tools/tensorflow_docs/api_generator/parser.py index 84b7533d08b..b8f906bffd7 100644 --- a/tools/tensorflow_docs/api_generator/parser.py +++ b/tools/tensorflow_docs/api_generator/parser.py @@ -685,7 +685,7 @@ class FileLocation(object): @property def url(self) -> Optional[str]: if self.start_line and self.end_line: - if self.base_url.startswith('https://github.com/'): + if self.base_url and self.base_url.startswith('https://github.com/'): return f'{self.base_url}#L{self.start_line}-L{self.end_line}' return self.base_url From f3bc5209dd2d2e6981c3e5a2ba413f865170d95d Mon Sep 17 00:00:00 2001 From: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:07:54 +0000 Subject: [PATCH 11/41] Lint and update Boundless notebook --- site/en/hub/tutorials/boundless.ipynb | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/site/en/hub/tutorials/boundless.ipynb b/site/en/hub/tutorials/boundless.ipynb index 50ae2a5cfec..f53fc5bb004 100644 --- a/site/en/hub/tutorials/boundless.ipynb +++ b/site/en/hub/tutorials/boundless.ipynb @@ -82,9 +82,9 @@ "id": "hDKbpAEZf8Lt" }, "source": [ - "## Imports and Setup\n", + "## Imports and setup\n", "\n", - "Lets start with the base imports." + "Start with the base imports:" ] }, { @@ -110,9 +110,9 @@ "id": "pigUDIXtciQO" }, "source": [ - "## Reading image for input\n", + "## Create a function for reading an image\n", "\n", - "Lets create a util method to help load the image and format it for the model (257x257x3). This method will also crop the image to a square to avoid distortion and you can use with local images or from the internet." + "Create a utility function to help load an image and format it for the model (257x257x3). This method will also crop the image to a square to avoid distortion and you can use it with local images or from the internet." ] }, { @@ -147,9 +147,9 @@ "id": "lonrLxuKcsL0" }, "source": [ - "## Visualization method\n", + "## Create a visualization function\n", "\n", - "We will also create a visuzalization method to show the original image side by side with the masked version and the \"filled\" version, both generated by the model." + "Create a visualization function to show the original image side-by-side with the masked version and the \"filled\" version, both generated by the model." ] }, { @@ -183,9 +183,9 @@ "id": "8rwaCWmxdJGH" }, "source": [ - "## Loading an Image\n", + "## Load an image\n", "\n", - "You will load a sample image but feel free to upload your own image to the Colab notebook. Remember that the model may have some limitations regarding human images." + "Now you can load a sample image. Feel free to use your own image by uploading it to the Colab notebook. Remember that the model may have some limitations regarding human images." ] }, { @@ -210,10 +210,10 @@ "id": "4lIkmZL_dtyX" }, "source": [ - "## Selecting a model from TensorFlow Hub\n", + "## Select a model from TensorFlow Hub\n", "\n", - "On TensorFlow Hub we have 3 versions of the Boundless model: Half, Quarter and Three Quarters.\n", - "In the following cell you can chose any of them and try on your image. If you want to try with another one, just chose it and execute the following cells." + "On TensorFlow Hub there are three versions of the Boundless model: Half, Quarter and Three Quarters.\n", + "In the following cell you can choose any of the models and apply them on your image. If you want to pick another model, select it below and then run the following cells." ] }, { @@ -241,9 +241,9 @@ "id": "aSJFeNNSeOn8" }, "source": [ - "Now that we've chosen the model we want, lets load it from TensorFlow Hub.\n", + "After choosing your model, you can load it from TensorFlow Hub.\n", "\n", - "**Note**: You can point your browser to the model handle to read the model's documentation." + "**Note**: You can point to a model handle to read the model's documentation." ] }, { @@ -264,14 +264,14 @@ "id": "L4G7CPOaeuQb" }, "source": [ - "## Doing Inference\n", + "## Perform inference\n", "\n", - "The boundless model have two outputs:\n", + "The boundless model has two outputs:\n", "\n", "* The input image with a mask applied\n", "* The masked image with the extrapolation to complete it\n", "\n", - "we can use these two images to show a comparisson visualization." + "You can compare these two images with a visualization as follows:" ] }, { From e865955a3e30b5c15808ee968950a7adbc621106 Mon Sep 17 00:00:00 2001 From: Surya <116063290+SuryanarayanaY@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:26:37 +0530 Subject: [PATCH 12/41] Fix the broken link of Mnist dataset in beginner.ipynb This page contains hyperlink for Mnist dataset which is actually asking for credentials now. IMO, for this page the hyperlink may not required.Hence I propose to delete the hyperlink. Fixes TF ticket #62306 Thanks! --- site/en/tutorials/quickstart/beginner.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/tutorials/quickstart/beginner.ipynb b/site/en/tutorials/quickstart/beginner.ipynb index bf690f06147..6a7811cfde4 100644 --- a/site/en/tutorials/quickstart/beginner.ipynb +++ b/site/en/tutorials/quickstart/beginner.ipynb @@ -125,7 +125,7 @@ "\n", "## Load a dataset\n", "\n", - "Load and prepare the [MNIST dataset](http://yann.lecun.com/exdb/mnist/). The pixel values of the images range from 0 through 255. Scale these values to a range of 0 to 1 by dividing the values by `255.0`. This also converts the sample data from integers to floating-point numbers:" + "Load and prepare the MNIST dataset. The pixel values of the images range from 0 through 255. Scale these values to a range of 0 to 1 by dividing the values by `255.0`. This also converts the sample data from integers to floating-point numbers:" ] }, { From ec765851b8312bdc4dcf685e41020ce568c7bff2 Mon Sep 17 00:00:00 2001 From: Raviteja Gorijala Date: Mon, 20 Nov 2023 14:27:17 -0800 Subject: [PATCH 13/41] TF 2.15: Update documentation for wheel locations and toolchain changes PiperOrigin-RevId: 584128923 --- site/en/install/lang_c.ipynb | 10 +++++----- site/en/install/pip.md | 24 ++++++++++++------------ site/en/install/source.md | 3 +++ site/en/install/source_windows.md | 1 + 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/site/en/install/lang_c.ipynb b/site/en/install/lang_c.ipynb index 1e1cb878e74..cfff20db10b 100644 --- a/site/en/install/lang_c.ipynb +++ b/site/en/install/lang_c.ipynb @@ -130,16 +130,16 @@ " Linux\n", " \n", " Linux CPU only\n", - " https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.14.0.tar.gz\n", + " https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.15.0.tar.gz\n", " \n", " \n", " Linux GPU support\n", - " https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.14.0.tar.gz\n", + " https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.15.0.tar.gz\n", " \n", " macOS\n", " \n", " macOS CPU only\n", - " https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-2.14.0.tar.gz\n", + " https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-2.15.0.tar.gz\n", " \n", " Windows\n", "