Skip to content

Commit

Permalink
fix conv1d code in nb
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed May 5, 2020
1 parent 76c0c58 commit 15f171f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch15/ch15_part1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
" x_padded = np.concatenate(\n",
" [zero_pad, x_padded, zero_pad])\n",
" res = []\n",
" for i in range(0, int(len(x)/s),s):\n",
" for i in range(0, int((len(x_padded) - len(w_rot)) / s) + 1, s):\n",
" res.append(np.sum(\n",
" x_padded[i:i+w_rot.shape[0]] * w_rot))\n",
" return np.array(res)\n",
Expand Down

0 comments on commit 15f171f

Please sign in to comment.