From 32583008497f4c3ffd8bce6b81fd94def414a551 Mon Sep 17 00:00:00 2001 From: udlbook <110402648+udlbook@users.noreply.github.com> Date: Thu, 7 Dec 2023 19:15:25 +0000 Subject: [PATCH] Created using Colaboratory --- Notebooks/Chap10/10_3_2D_Convolution.ipynb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Notebooks/Chap10/10_3_2D_Convolution.ipynb b/Notebooks/Chap10/10_3_2D_Convolution.ipynb index 9a4ff53..c304cc0 100644 --- a/Notebooks/Chap10/10_3_2D_Convolution.ipynb +++ b/Notebooks/Chap10/10_3_2D_Convolution.ipynb @@ -4,7 +4,7 @@ "metadata": { "colab": { "provenance": [], - "authorship_tag": "ABX9TyMmbD0cKYvIHXbKX4AupA1x", + "authorship_tag": "ABX9TyNDaU2KKZDyY9Ea7vm/fNxo", "include_colab_link": true }, "kernelspec": { @@ -114,6 +114,11 @@ " # Create output\n", " out = np.zeros((batchSize, channelsOut, imageHeightOut, imageWidthOut), dtype=np.float32)\n", "\n", + " # !!!!!! NOTE THERE IS A SUBTLETY HERE !!!!!!!!\n", + " # I have padded the image with zeros above, so it is surrouned by a \"ring\" of zeros\n", + " # That means that the image indexes are all off by one\n", + " # This actually makes your code simpler\n", + "\n", " for c_y in range(imageHeightOut):\n", " for c_x in range(imageWidthOut):\n", " for c_kernel_y in range(kernelHeight):\n",