Skip to content

Commit

Permalink
notebook updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Sep 6, 2024
1 parent e42cdf0 commit 615f7a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 5 additions & 6 deletions machine-learning-hats/notebooks/4-conv2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@
"### Convolution Operation\n",
"Two-dimensional convolutional layer for image height $H$, width $W$, number of input channels $C$, number of output kernels (filters) $N$, and kernel height $J$ and width $K$ is given by:\n",
"\n",
"\\begin{align}\n",
"\\label{convLayer}\n",
"\\boldsymbol{Y}[v,u,n] &= \\boldsymbol{\\beta}[n] + \\sum_{c=1}^{C} \\sum_{j=1}^{J} \\sum_{k=1}^{K} \\boldsymbol{X}[v+j,u+k,c]\\, \\boldsymbol{W}[j,k,c,n]\\,,\n",
"\\end{align}\n",
"$$\n",
"\\boldsymbol{Y}[v,u,n] = \\boldsymbol{\\beta}[n] + \\sum_{c=1}^{C} \\sum_{j=1}^{J} \\sum_{k=1}^{K} \\boldsymbol{X}[v+j,u+k,c]\\, \\boldsymbol{W}[j,k,c,n]\\,,\n",
"$$\n",
"\n",
"where $Y$ is the output tensor of size $V \\times U \\times N$, $W$ is the weight tensor of size $J \\times K \\times C \\times N$ and $\\beta$ is the bias vector of length $N$ .\n",
"\n",
"The example below has $C=1$ input channel and $N=1$ ($J\\times K=3\\times 3$) kernel [credit](https://towardsdatascience.com/types-of-convolution-kernels-simplified-f040cb307c37):\n",
"The example below has $C=1$ input channel and $N=1$ ($J\\times K=3\\times 3$) kernel ([credit](https://towardsdatascience.com/types-of-convolution-kernels-simplified-f040cb307c37)):\n",
"\n",
"![convolution](https://miro.medium.com/v2/resize:fit:780/1*Eai425FYQQSNOaahTXqtgg.gif)"
]
Expand All @@ -84,7 +83,7 @@
"source": [
"### Pooling\n",
"\n",
"We also add pooling layers to reduce the image size between layers. For example, max pooling: (also from [here]([page](https://cs231n.github.io/convolutional-networks/))\n",
"We also add pooling layers to reduce the image size between layers. For example, max pooling (also from [here]([page](https://cs231n.github.io/convolutional-networks/))):\n",
"\n",
"![maxpool](https://cs231n.github.io/assets/cnn/maxpool.jpeg)"
]
Expand Down
Loading

0 comments on commit 615f7a6

Please sign in to comment.