convolution layer example fix

main
gsundeep-tech 2021-06-24 10:45:35 +08:00
parent fd4c180f93
commit 6389f0142a
1 changed files with 15 additions and 5 deletions

View File

@ -226,21 +226,31 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"conv = keras.layers.Conv2D(filters=32, kernel_size=3, strides=1,\n",
" padding=\"SAME\", activation=\"relu\")"
" padding=\"SAME\", activation=\"relu\", input_shape=outputs.shape)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"plot_image(crop(outputs[0, :, :, 0]))\n",
"conv_outputs = conv(outputs)\n",
"conv_outputs.shape "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"plot_image(conv_outputs[0, :, :, 0])\n",
"plt.show()"
]
},
@ -1368,7 +1378,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.8.10"
},
"nav_menu": {},
"toc": {