From 30801a1d2b3ccb1a9f0c6de4392b6f0451311a83 Mon Sep 17 00:00:00 2001 From: udlbook <110402648+udlbook@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:45:49 -0500 Subject: [PATCH] Created using Colaboratory --- Notebooks/Chap11/11_1_Shattered_Gradients.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Notebooks/Chap11/11_1_Shattered_Gradients.ipynb b/Notebooks/Chap11/11_1_Shattered_Gradients.ipynb index 27aae4c..6ef827d 100644 --- a/Notebooks/Chap11/11_1_Shattered_Gradients.ipynb +++ b/Notebooks/Chap11/11_1_Shattered_Gradients.ipynb @@ -4,7 +4,7 @@ "metadata": { "colab": { "provenance": [], - "authorship_tag": "ABX9TyMrF4rB2hTKq7XzLuYsURdL", + "authorship_tag": "ABX9TyMLKg5ZmXqojcVrZD5BGm9g", "include_colab_link": true }, "kernelspec": { @@ -235,7 +235,7 @@ "# Finite difference calculation\n", "dydx_fd = (y2-y1)/delta\n", "\n", - "print(\"Gradient calculation=%f, Finite difference gradient=%f\"%(dydx,dydx_fd))\n" + "print(\"Gradient calculation=%f, Finite difference gradient=%f\"%(dydx.squeeze(),dydx_fd.squeeze()))\n" ], "metadata": { "id": "KJpQPVd36Haq"