diff --git a/notebook.ipynb b/notebook.ipynb
new file mode 100644
index 0000000..e02502d
--- /dev/null
+++ b/notebook.ipynb
@@ -0,0 +1 @@
+{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"source":"
","metadata":{},"cell_type":"markdown"},{"cell_type":"markdown","source":"# Importing Necessary Libraries","metadata":{}},{"cell_type":"code","source":"import tensorflow as tf\nimport matplotlib.pyplot as plt\nimport cv2, imghdr\nimport numpy as np\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-10-01T12:30:09.397936Z","iopub.execute_input":"2023-10-01T12:30:09.398268Z","iopub.status.idle":"2023-10-01T12:30:20.18792Z","shell.execute_reply.started":"2023-10-01T12:30:09.398242Z","shell.execute_reply":"2023-10-01T12:30:20.186688Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Loading The Data","metadata":{}},{"cell_type":"markdown","source":"## Data is loaded using keras can be seen below-","metadata":{}},{"cell_type":"code","source":"data = tf.keras.utils.image_dataset_from_directory('/kaggle/input/cat-and-dog-images-dataset/Dog and Cat .png')","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:30:25.64669Z","iopub.execute_input":"2023-10-01T12:30:25.648307Z","iopub.status.idle":"2023-10-01T12:30:25.987433Z","shell.execute_reply.started":"2023-10-01T12:30:25.64826Z","shell.execute_reply":"2023-10-01T12:30:25.985942Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data_iterator = data.as_numpy_iterator()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:31:15.531716Z","iopub.execute_input":"2023-10-01T12:31:15.532092Z","iopub.status.idle":"2023-10-01T12:31:15.599944Z","shell.execute_reply.started":"2023-10-01T12:31:15.532066Z","shell.execute_reply":"2023-10-01T12:31:15.598756Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## This gets a new batch from iterator and can be run again to get new batches","metadata":{}},{"cell_type":"code","source":"batch = data_iterator.next()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:36:01.727571Z","iopub.execute_input":"2023-10-01T12:36:01.727991Z","iopub.status.idle":"2023-10-01T12:36:01.734654Z","shell.execute_reply.started":"2023-10-01T12:36:01.727961Z","shell.execute_reply":"2023-10-01T12:36:01.733036Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(batch)","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:32:31.306552Z","iopub.execute_input":"2023-10-01T12:32:31.307562Z","iopub.status.idle":"2023-10-01T12:32:31.315566Z","shell.execute_reply.started":"2023-10-01T12:32:31.307519Z","shell.execute_reply":"2023-10-01T12:32:31.313868Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"batch[0].shape","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:32:42.116694Z","iopub.execute_input":"2023-10-01T12:32:42.117115Z","iopub.status.idle":"2023-10-01T12:32:42.126058Z","shell.execute_reply.started":"2023-10-01T12:32:42.117077Z","shell.execute_reply":"2023-10-01T12:32:42.124408Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"batch[1]","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:32:57.358065Z","iopub.execute_input":"2023-10-01T12:32:57.35859Z","iopub.status.idle":"2023-10-01T12:32:57.366348Z","shell.execute_reply.started":"2023-10-01T12:32:57.358557Z","shell.execute_reply":"2023-10-01T12:32:57.365431Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Visualising The Data(Using matplotlib library)","metadata":{}},{"cell_type":"code","source":"fig, ax = plt.subplots(ncols = 5, figsize = (20,20))\nfor idx, img in enumerate (batch[0][:5]):\n ax[idx].imshow(img.astype(int))\n ax[idx].title.set_text(batch[1][idx])","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:36:05.740703Z","iopub.execute_input":"2023-10-01T12:36:05.741068Z","iopub.status.idle":"2023-10-01T12:36:07.009008Z","shell.execute_reply.started":"2023-10-01T12:36:05.74104Z","shell.execute_reply":"2023-10-01T12:36:07.007958Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## As we can see above that\n### Number '0' --> Cats\n### Number '1' --> Dogs","metadata":{}},{"cell_type":"code","source":"batch[0].max()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:36:35.710442Z","iopub.execute_input":"2023-10-01T12:36:35.710819Z","iopub.status.idle":"2023-10-01T12:36:35.720165Z","shell.execute_reply.started":"2023-10-01T12:36:35.710792Z","shell.execute_reply":"2023-10-01T12:36:35.719272Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scaled = batch[0]/255\nscaled.max()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:37:07.992832Z","iopub.execute_input":"2023-10-01T12:37:07.993196Z","iopub.status.idle":"2023-10-01T12:37:08.017678Z","shell.execute_reply.started":"2023-10-01T12:37:07.993169Z","shell.execute_reply":"2023-10-01T12:37:08.016513Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Preprocessing The Data","metadata":{}},{"cell_type":"markdown","source":"### So,as we have seen that it is very important to scale the data and doing that one by one is not feasable for bigger data so to do that easily we scale the data in a pipeline","metadata":{}},{"cell_type":"code","source":"data = data.map(lambda x, y : (x/255, y))","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:38:38.956756Z","iopub.execute_input":"2023-10-01T12:38:38.957126Z","iopub.status.idle":"2023-10-01T12:38:38.988727Z","shell.execute_reply.started":"2023-10-01T12:38:38.957099Z","shell.execute_reply":"2023-10-01T12:38:38.987607Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.as_numpy_iterator().next()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:39:03.65077Z","iopub.execute_input":"2023-10-01T12:39:03.651161Z","iopub.status.idle":"2023-10-01T12:39:04.42783Z","shell.execute_reply.started":"2023-10-01T12:39:03.651131Z","shell.execute_reply":"2023-10-01T12:39:04.426315Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scaled_iterator = data.as_numpy_iterator()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:39:43.060506Z","iopub.execute_input":"2023-10-01T12:39:43.060876Z","iopub.status.idle":"2023-10-01T12:39:43.072816Z","shell.execute_reply.started":"2023-10-01T12:39:43.06085Z","shell.execute_reply":"2023-10-01T12:39:43.071817Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"batch = scaled_iterator.next()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:40:05.06178Z","iopub.execute_input":"2023-10-01T12:40:05.062152Z","iopub.status.idle":"2023-10-01T12:40:05.730692Z","shell.execute_reply.started":"2023-10-01T12:40:05.062125Z","shell.execute_reply":"2023-10-01T12:40:05.7296Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Re-Visualising The Data","metadata":{}},{"cell_type":"code","source":"fig, ax = plt.subplots(ncols = 5, figsize = (20,20))\nfor idx, img in enumerate (batch[0][:5]):\n ax[idx].imshow(img)\n ax[idx].title.set_text(batch[1][idx])","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:41:35.520731Z","iopub.execute_input":"2023-10-01T12:41:35.521085Z","iopub.status.idle":"2023-10-01T12:41:36.786251Z","shell.execute_reply.started":"2023-10-01T12:41:35.521059Z","shell.execute_reply":"2023-10-01T12:41:36.785232Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Splitting The Data(For Training, Testing , Validating)","metadata":{}},{"cell_type":"code","source":"len(data)","metadata":{"execution":{"iopub.status.busy":"2023-10-01T12:41:52.981198Z","iopub.execute_input":"2023-10-01T12:41:52.981599Z","iopub.status.idle":"2023-10-01T12:41:52.991077Z","shell.execute_reply.started":"2023-10-01T12:41:52.981568Z","shell.execute_reply":"2023-10-01T12:41:52.989804Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_size = int(len(data)*.7)\nval_size = int(len(data)*.2)+1\ntest_size = int(len(data)*.1)\n\ntrain_size + val_size +test_size","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:17.603376Z","iopub.execute_input":"2023-10-01T13:26:17.603734Z","iopub.status.idle":"2023-10-01T13:26:17.612119Z","shell.execute_reply.started":"2023-10-01T13:26:17.603708Z","shell.execute_reply":"2023-10-01T13:26:17.61088Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = data.take(train_size)\nvalid = data.skip(train_size).take(val_size)\ntest = data.skip(train_size + val_size).take(test_size)","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:19.860484Z","iopub.execute_input":"2023-10-01T13:26:19.861162Z","iopub.status.idle":"2023-10-01T13:26:19.868433Z","shell.execute_reply.started":"2023-10-01T13:26:19.861133Z","shell.execute_reply":"2023-10-01T13:26:19.867641Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Making Deep Learning Model","metadata":{}},{"cell_type":"markdown","source":"### Building Neural Networks","metadata":{}},{"cell_type":"code","source":"from tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Conv2D, Flatten, MaxPooling2D, Dense","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:23.835781Z","iopub.execute_input":"2023-10-01T13:26:23.836433Z","iopub.status.idle":"2023-10-01T13:26:23.840699Z","shell.execute_reply.started":"2023-10-01T13:26:23.836402Z","shell.execute_reply":"2023-10-01T13:26:23.839804Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model = Sequential()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:25.356086Z","iopub.execute_input":"2023-10-01T13:26:25.35646Z","iopub.status.idle":"2023-10-01T13:26:25.365073Z","shell.execute_reply.started":"2023-10-01T13:26:25.356431Z","shell.execute_reply":"2023-10-01T13:26:25.364092Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### The Conv2D layer is defined by parts below-","metadata":{}},{"cell_type":"code","source":"# model.add(Conv2D(, , , , ))\nmodel.add(Conv2D(16, (3,3), 1, activation = 'relu', input_shape = (256,256,3)))\nmodel.add(MaxPooling2D())\n\nmodel.add(Conv2D(32, (3,3), 1, activation = 'relu'))\nmodel.add(MaxPooling2D())\n\nmodel.add(Conv2D(16, (3,3), 1, activation = 'relu'))\nmodel.add(MaxPooling2D())\n\nmodel.add(Flatten())\n\nmodel.add(Dense(256, activation = 'relu'))\n\nmodel.add(Dense(1, activation = 'sigmoid'))","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:28.476177Z","iopub.execute_input":"2023-10-01T13:26:28.477342Z","iopub.status.idle":"2023-10-01T13:26:28.57801Z","shell.execute_reply.started":"2023-10-01T13:26:28.477296Z","shell.execute_reply":"2023-10-01T13:26:28.576636Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Here,The Optimizer We Use Is ADAM and losses are measured by BinaryCrossEntropy at last the metrics is set which is Accuracy","metadata":{}},{"cell_type":"code","source":"model.compile('adam', loss = tf.losses.BinaryCrossentropy(), metrics = ['accuracy'])","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:31.142077Z","iopub.execute_input":"2023-10-01T13:26:31.142498Z","iopub.status.idle":"2023-10-01T13:26:31.160313Z","shell.execute_reply.started":"2023-10-01T13:26:31.142451Z","shell.execute_reply":"2023-10-01T13:26:31.158895Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.summary()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:33.260687Z","iopub.execute_input":"2023-10-01T13:26:33.261101Z","iopub.status.idle":"2023-10-01T13:26:33.303212Z","shell.execute_reply.started":"2023-10-01T13:26:33.261072Z","shell.execute_reply":"2023-10-01T13:26:33.301924Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Training The Network","metadata":{}},{"cell_type":"code","source":"logdir = 'logs'","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:37.076179Z","iopub.execute_input":"2023-10-01T13:26:37.076807Z","iopub.status.idle":"2023-10-01T13:26:37.08256Z","shell.execute_reply.started":"2023-10-01T13:26:37.076765Z","shell.execute_reply":"2023-10-01T13:26:37.080951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir = logdir)","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:39.516269Z","iopub.execute_input":"2023-10-01T13:26:39.516696Z","iopub.status.idle":"2023-10-01T13:26:39.522292Z","shell.execute_reply.started":"2023-10-01T13:26:39.516667Z","shell.execute_reply":"2023-10-01T13:26:39.521237Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"history = model.fit(train, epochs = 20, validation_data = valid, callbacks = [tensorboard_callback] )","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:26:41.525578Z","iopub.execute_input":"2023-10-01T13:26:41.525954Z","iopub.status.idle":"2023-10-01T13:39:39.414818Z","shell.execute_reply.started":"2023-10-01T13:26:41.525923Z","shell.execute_reply":"2023-10-01T13:39:39.413442Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Plotting The Performance Of Model","metadata":{}},{"cell_type":"code","source":"fig = plt.figure()\nplt.plot(history.history['loss'], color = 'purple', label = 'loss')\nplt.plot(history.history['val_loss'], color = 'red', label = 'val_loss')\nfig.suptitle('Loss', fontsize = 20)\nplt.legend(loc = \"upper left\")\nplt.show()\n\nfig = plt.figure()\nplt.plot(history.history['accuracy'], color = 'purple', label = 'accuracy')\nplt.plot(history.history['val_accuracy'], color = 'red', label = 'val_accuracy')\nfig.suptitle('Accuracy', fontsize = 20)\nplt.legend(loc = \"upper left\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:39:39.866607Z","iopub.execute_input":"2023-10-01T13:39:39.8672Z","iopub.status.idle":"2023-10-01T13:39:40.424201Z","shell.execute_reply.started":"2023-10-01T13:39:39.867171Z","shell.execute_reply":"2023-10-01T13:39:40.422845Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Evaluating Performance","metadata":{}},{"cell_type":"code","source":"from tensorflow.keras.metrics import Precision , Recall , BinaryAccuracy","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:40:17.276981Z","iopub.execute_input":"2023-10-01T13:40:17.277368Z","iopub.status.idle":"2023-10-01T13:40:17.283114Z","shell.execute_reply.started":"2023-10-01T13:40:17.277338Z","shell.execute_reply":"2023-10-01T13:40:17.281842Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"precision = Precision()\nrecall = Recall()\naccuracy = BinaryAccuracy()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:40:37.156249Z","iopub.execute_input":"2023-10-01T13:40:37.156668Z","iopub.status.idle":"2023-10-01T13:40:37.176912Z","shell.execute_reply.started":"2023-10-01T13:40:37.156639Z","shell.execute_reply":"2023-10-01T13:40:37.175275Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for batch in test.as_numpy_iterator():\n X, y = batch\n yhat = model.predict(X)\n precision.update_state(y, yhat)\n recall.update_state(y, yhat)\n accuracy.update_state (y, yhat)","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:40:49.902786Z","iopub.execute_input":"2023-10-01T13:40:49.903145Z","iopub.status.idle":"2023-10-01T13:40:55.047861Z","shell.execute_reply.started":"2023-10-01T13:40:49.903118Z","shell.execute_reply":"2023-10-01T13:40:55.046461Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(f'Precision:{precision.result().numpy()}, Recall:{recall.result().numpy()}, Accuracy:{accuracy.result().numpy()}')","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:41:09.892455Z","iopub.execute_input":"2023-10-01T13:41:09.893904Z","iopub.status.idle":"2023-10-01T13:41:09.908614Z","shell.execute_reply.started":"2023-10-01T13:41:09.893844Z","shell.execute_reply":"2023-10-01T13:41:09.906649Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Testing","metadata":{}},{"cell_type":"code","source":"import cv2","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:42:58.282774Z","iopub.execute_input":"2023-10-01T13:42:58.283292Z","iopub.status.idle":"2023-10-01T13:42:58.289278Z","shell.execute_reply.started":"2023-10-01T13:42:58.283252Z","shell.execute_reply":"2023-10-01T13:42:58.288012Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img = cv2.imread('/kaggle/input/cat-test-jpg/cat_61.jpg' )\nplt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:48:12.106242Z","iopub.execute_input":"2023-10-01T13:48:12.106661Z","iopub.status.idle":"2023-10-01T13:48:12.714714Z","shell.execute_reply.started":"2023-10-01T13:48:12.10663Z","shell.execute_reply":"2023-10-01T13:48:12.713225Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Now We know our model accept the image in size 256 * 256,so we will resize the test image","metadata":{}},{"cell_type":"code","source":"resize = tf.image.resize(img, (256,256))\nplt.imshow(resize.numpy().astype(int))\nplt.show","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:50:04.316078Z","iopub.execute_input":"2023-10-01T13:50:04.316558Z","iopub.status.idle":"2023-10-01T13:50:04.685481Z","shell.execute_reply.started":"2023-10-01T13:50:04.316527Z","shell.execute_reply":"2023-10-01T13:50:04.684263Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yhat = model.predict(np.expand_dims(resize/255, 0))","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:50:39.366807Z","iopub.execute_input":"2023-10-01T13:50:39.367307Z","iopub.status.idle":"2023-10-01T13:50:39.483111Z","shell.execute_reply.started":"2023-10-01T13:50:39.367275Z","shell.execute_reply":"2023-10-01T13:50:39.481579Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yhat","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:50:43.246344Z","iopub.execute_input":"2023-10-01T13:50:43.246822Z","iopub.status.idle":"2023-10-01T13:50:43.254578Z","shell.execute_reply.started":"2023-10-01T13:50:43.24679Z","shell.execute_reply":"2023-10-01T13:50:43.253614Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"if yhat > 0.5:\n print(\"Predicted Outcome = DOG\")\nelse:\n print(\"Predicted Outcome = CAT\")","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:50:56.861109Z","iopub.execute_input":"2023-10-01T13:50:56.861608Z","iopub.status.idle":"2023-10-01T13:50:56.868132Z","shell.execute_reply.started":"2023-10-01T13:50:56.861574Z","shell.execute_reply":"2023-10-01T13:50:56.866997Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Saving The Model","metadata":{}},{"cell_type":"code","source":"import os","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:52:03.701001Z","iopub.execute_input":"2023-10-01T13:52:03.701489Z","iopub.status.idle":"2023-10-01T13:52:03.70758Z","shell.execute_reply.started":"2023-10-01T13:52:03.701435Z","shell.execute_reply":"2023-10-01T13:52:03.705966Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from tensorflow.keras.models import load_model","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:52:05.295709Z","iopub.execute_input":"2023-10-01T13:52:05.296113Z","iopub.status.idle":"2023-10-01T13:52:05.300686Z","shell.execute_reply.started":"2023-10-01T13:52:05.296083Z","shell.execute_reply":"2023-10-01T13:52:05.299574Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.save(os.path.join('models', 'ImageClassifierCatDog.h5 '))","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:52:07.820572Z","iopub.execute_input":"2023-10-01T13:52:07.820956Z","iopub.status.idle":"2023-10-01T13:52:09.247744Z","shell.execute_reply.started":"2023-10-01T13:52:07.820928Z","shell.execute_reply":"2023-10-01T13:52:09.246718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"new_model = load_model(os.path.join('models', 'ImageClassifierCatDog.h5 ') )","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:52:22.501103Z","iopub.execute_input":"2023-10-01T13:52:22.501446Z","iopub.status.idle":"2023-10-01T13:52:23.041704Z","shell.execute_reply.started":"2023-10-01T13:52:22.50142Z","shell.execute_reply":"2023-10-01T13:52:23.040561Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"yhat_new = new_model.predict(np.expand_dims(resize/255, 0))","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:52:34.511317Z","iopub.execute_input":"2023-10-01T13:52:34.511685Z","iopub.status.idle":"2023-10-01T13:52:34.669132Z","shell.execute_reply.started":"2023-10-01T13:52:34.511659Z","shell.execute_reply":"2023-10-01T13:52:34.667985Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"if yhat_new > 0.5:\n print(\"Predicted Outcome = DOG\")\nelse:\n print(\"Predicted Outcome = CAT\")","metadata":{"execution":{"iopub.status.busy":"2023-10-01T13:52:43.62214Z","iopub.execute_input":"2023-10-01T13:52:43.622605Z","iopub.status.idle":"2023-10-01T13:52:43.629005Z","shell.execute_reply.started":"2023-10-01T13:52:43.622574Z","shell.execute_reply":"2023-10-01T13:52:43.62804Z"},"trusted":true},"execution_count":null,"outputs":[]}]}
\ No newline at end of file