Model testing first part added

parent 8b054155
......@@ -523,6 +523,37 @@
"ensemble_output = Average()(model_outputs)\n",
"ensemble_model = Model(inputs = model_input , outputs = ensemble_output , name = 'ensemble')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"🟩 04 - Model Testing by Make Predictions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def load_and_prep_image(filename , img_shape=224):\n",
"\n",
" print('FILe Name type - ', type(filename))\n",
" img = tf.io.read_file(filename)\n",
" print('img 1- ', type(img))\n",
"\n",
" img = tf.image.decode_image(img)\n",
" print('img 2- ', type(img))\n",
" \n",
" img = tf.image.resize(img , size=[img_shape , img_shape])\n",
"\n",
" img = img/255.\n",
"\n",
" return img"
]
}
],
"metadata": {
......
......@@ -523,6 +523,37 @@
"ensemble_output = Average()(model_outputs)\n",
"ensemble_model = Model(inputs = model_input , outputs = ensemble_output , name = 'ensemble')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"🟩 04 - Model Testing by Make Predictions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def load_and_prep_image(filename , img_shape=224):\n",
"\n",
" print('FILe Name type - ', type(filename))\n",
" img = tf.io.read_file(filename)\n",
" print('img 1- ', type(img))\n",
"\n",
" img = tf.image.decode_image(img)\n",
" print('img 2- ', type(img))\n",
" \n",
" img = tf.image.resize(img , size=[img_shape , img_shape])\n",
"\n",
" img = img/255.\n",
"\n",
" return img"
]
}
],
"metadata": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment