Commit 586358b8 authored by Ekanayake G.B.E.M.K's avatar Ekanayake G.B.E.M.K

Train Xception model

parent 6efa4c3d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -101,32 +101,9 @@ ...@@ -101,32 +101,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Found 4015 images belonging to 5 classes.\n",
"Found 1001 images belonging to 5 classes.\n"
]
},
{
"data": {
"text/plain": [
"{'Caterpillars': 0,\n",
" 'DryingofLeaflets': 1,\n",
" 'Flaccidity': 2,\n",
" 'Leaflets': 3,\n",
" 'Yellowing leaf': 4}"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"train_generator, validation_generator = image_data_generator()\n", "train_generator, validation_generator = image_data_generator()\n",
"train_generator.class_indices" "train_generator.class_indices"
...@@ -134,7 +111,7 @@ ...@@ -134,7 +111,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -192,7 +169,7 @@ ...@@ -192,7 +169,7 @@
" \n", " \n",
" self.model = model\n", " self.model = model\n",
" # self.model.summary()\n", " # self.model.summary()\n",
"\n", " #Train xception model\n",
" def train(self):\n", " def train(self):\n",
" callback = tf.keras.callbacks.EarlyStopping(\n", " callback = tf.keras.callbacks.EarlyStopping(\n",
" monitor='val_loss', \n", " monitor='val_loss', \n",
...@@ -252,7 +229,7 @@ ...@@ -252,7 +229,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -262,7 +239,7 @@ ...@@ -262,7 +239,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -301,7 +278,7 @@ ...@@ -301,7 +278,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -363,7 +340,7 @@ ...@@ -363,7 +340,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]" "version": "3.10.4"
}, },
"orig_nbformat": 4, "orig_nbformat": 4,
"vscode": { "vscode": {
......
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