From 71190b7878c98469f44acbef80289df86062a5d8 Mon Sep 17 00:00:00 2001 From: neilblaze Date: Fri, 21 Apr 2023 03:03:32 +0530 Subject: [PATCH] updated ipynb files --- docs/guides/flax_basics.ipynb | 40 ++++++++++++++++---------------- docs/notebooks/full_eval.ipynb | 35 ++++++++++++++++------------ docs/notebooks/full_eval.md | 5 ++++ docs/notebooks/linen_intro.ipynb | 28 +++++++++++----------- 4 files changed, 59 insertions(+), 49 deletions(-) diff --git a/docs/guides/flax_basics.ipynb b/docs/guides/flax_basics.ipynb index 75f4a0db24..63172cf82e 100644 --- a/docs/guides/flax_basics.ipynb +++ b/docs/guides/flax_basics.ipynb @@ -33,7 +33,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "id": "qdrEVv9tinJn", "outputId": "e30aa464-fa52-4f35-df96-716c68a4b3ee", @@ -60,7 +60,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "id": "kN6bZDaReZO2" }, @@ -90,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "id": "zWX2zEtphT4Y" }, @@ -115,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": { "id": "K529lhzeYtl8", "outputId": "06feb9d2-db50-4f41-c169-6df4336f43a5" @@ -182,7 +182,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": { "id": "HtOFWeiynaJo", "outputId": "689b4230-2a3d-4823-d103-2858e6debc4d" @@ -214,7 +214,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": { "id": "J8ietJecWiuK", "outputId": "7bbe6bb4-94d5-4574-fbb5-aa0fcd1c84ae" @@ -254,7 +254,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": { "id": "bFIiMnL4dl-e", "outputId": "6eae59dc-0632-4f53-eac8-c22a7c646a52" @@ -300,7 +300,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": { "id": "JqJaVc7BeNyT" }, @@ -328,7 +328,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": { "id": "ePEl1ndse0Jq", "outputId": "50d975b3-4706-4d8a-c4b8-2629ab8e3ac4" @@ -405,7 +405,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": { "id": "Ce77uDJx1bUF" }, @@ -419,7 +419,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": { "id": "PTSv0vx13xPO", "outputId": "eec0c096-1d9e-4b3c-f8e5-942ee63828ec" @@ -465,7 +465,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": { "id": "BiUPRU93XnAZ", "outputId": "b97e7d83-3e40-4a80-b1fe-1f6ceff30a0c" @@ -524,7 +524,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": { "id": "MOhoBDCOYYJ5", "outputId": "13acc4e1-8757-4554-e2c8-d594ba6e67dc" @@ -589,7 +589,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": { "id": "vbfrfbkxgPhg", "outputId": "b59c679c-d164-4fd6-92db-b50f0d310ec3" @@ -662,7 +662,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": { "id": "DEYrVA6dnaJu", "outputId": "4af16ec5-b52a-43b0-fc47-1f8ab25e7058" @@ -694,7 +694,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": { "id": "ZTCbdpQ4suSK", "outputId": "183a74ef-f54e-4848-99bf-fee4c174ba6d" @@ -770,7 +770,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "metadata": { "id": "wK371Pt_vVfR", "outputId": "83b5fea4-071e-4ea0-8fa8-610e69fb5fd5" @@ -861,7 +861,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "metadata": { "id": "J6_tR-nPzB1i", "outputId": "75465fd6-cdc8-497c-a3ec-7f709b5dde7a" @@ -928,7 +928,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": { "id": "IbTsCAvZcdBy", "outputId": "09a8bdd1-eaf8-401a-cf7c-386a7a5aa87b" @@ -981,7 +981,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": null, "metadata": { "id": "TUgAbUPpnaJw", "outputId": "0906fbab-b866-4956-d231-b1374415d448" diff --git a/docs/notebooks/full_eval.ipynb b/docs/notebooks/full_eval.ipynb index 50cb9b6ed4..3a8db30a2a 100644 --- a/docs/notebooks/full_eval.ipynb +++ b/docs/notebooks/full_eval.ipynb @@ -26,7 +26,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "id": "62DTHYCYHWp1", "outputId": "b38d096f-58db-4d61-effa-eafa4c732826", @@ -56,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "id": "NdzAaRwVExA9" }, @@ -80,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "id": "E30SS9gCIvrV" }, @@ -92,7 +92,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": { "id": "bZ-HWxKZHf6I", "outputId": "639262cb-b617-4561-c31f-60b33156a15f" @@ -141,7 +141,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": { "id": "yfGNjMBFWEUk", "outputId": "09f0c28b-d28e-4a7a-8afe-8797da44ad6d" @@ -196,7 +196,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": { "id": "eFPK-Oysl1YS", "outputId": "293bd0e4-011e-41b4-de48-a53b9cfd0958" @@ -226,7 +226,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": { "id": "DlAJwgYDmoxe", "outputId": "8bb353f3-98db-4645-e627-3c3683e36ea9" @@ -256,7 +256,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": { "id": "oUb7QrR2Iwk9", "outputId": "19234b4a-9f9c-47c4-cbcc-5f7fb2573746" @@ -305,7 +305,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": { "id": "dlJuEBcLKY94", "outputId": "e94cf79c-a033-4bc3-a086-75ecd8bd21f0" @@ -375,7 +375,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": { "id": "I1hg8paaasXj", "outputId": "2e6c611d-357e-4e51-99d8-47c24d785b11" @@ -441,7 +441,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": { "id": "pQX__5DfEX9g", "outputId": "71017214-c4ce-4da0-8db5-9300dba79c3a" @@ -493,15 +493,20 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "id": "eVGijAiLoAIQ" + }, "source": [ "#### Computing metrics in `eval_step`" ] }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, + "execution_count": null, + "metadata": { + "id": "IXxDVfmkoAIQ", + "outputId": "4c1dd7be-efb5-4a7a-898c-89a1350e21f3" + }, "outputs": [ { "name": "stdout", @@ -560,7 +565,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": { "id": "MjtmUUjWPV1X", "outputId": "70ee173a-dcdf-4136-a3e0-6685c09f8198" diff --git a/docs/notebooks/full_eval.md b/docs/notebooks/full_eval.md index 1f199cd475..407c67b3db 100644 --- a/docs/notebooks/full_eval.md +++ b/docs/notebooks/full_eval.md @@ -248,9 +248,14 @@ correct = correct.item() correct, total, correct / total ``` ++++ {"id": "eVGijAiLoAIQ"} + #### Computing metrics in `eval_step` ```{code-cell} ipython3 +:id: IXxDVfmkoAIQ +:outputId: 4c1dd7be-efb5-4a7a-898c-89a1350e21f3 + # moving the metrics computation into `eval_step()` and using `static_return` # this pattern is often used with more complicated `clu.metrics` diff --git a/docs/notebooks/linen_intro.ipynb b/docs/notebooks/linen_intro.ipynb index b22c01dafa..7c13ae55d8 100644 --- a/docs/notebooks/linen_intro.ipynb +++ b/docs/notebooks/linen_intro.ipynb @@ -62,7 +62,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "id": "Kvx7GmavHZbD" }, @@ -97,7 +97,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "id": "EcDH20Uufc-v" }, @@ -119,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": { "id": "Vjx0HWNcfa8h", "outputId": "3adfaeaf-977e-4e82-8adf-d254fae6eb91" @@ -179,7 +179,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": { "id": "R9QZ6EOBg5X8", "outputId": "e8c389a6-29f3-4f93-97ea-703e85a8b811" @@ -245,7 +245,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": { "id": "qB6l-9EabOwH", "outputId": "1a6c6a17-0b95-42c2-b5bf-b9ad80fd7758", @@ -310,7 +310,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": { "id": "UPNGIr6wcGaw", "outputId": "b3709789-e66e-4e20-f6b2-04022f8a62bb", @@ -393,7 +393,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": { "id": "7OACbTFHjMvl", "outputId": "bc5cb1f2-c5e9-4159-d131-73247009e32f", @@ -461,7 +461,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": { "id": "CE0CTLVvZ8Yn", "outputId": "1e822bd8-7a08-4e80-e0e6-a86637c46772", @@ -550,7 +550,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": { "id": "u6_fbrW2XT5t", "outputId": "2a8f5453-81b1-44dc-a431-d14b372c5710", @@ -622,7 +622,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": { "id": "BBrbcEdCnQ4o", "outputId": "8f299a5c-74c8-476c-93fa-e5543901ec45", @@ -778,7 +778,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": { "id": "UEUTO8bf0Kf2", "outputId": "3f324d0f-259f-40f0-8273-103f7fc281c5", @@ -846,7 +846,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "metadata": { "id": "sogMxDQpyMZE", "outputId": "7fe8e13b-7dd6-4e55-ee50-ce334e8ed178", @@ -925,7 +925,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": { "id": "PIGiriD0yFXo", "outputId": "223d880e-c7b2-4210-ebb5-dbfcdd9aed09", @@ -1075,7 +1075,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": { "id": "oxA_lWm7tH2B", "outputId": "7d9ebed3-64de-4ca8-9dce-4b09ba9e31a1",