OmerFarooq
commited on
Commit
•
5562623
1
Parent(s):
9213735
Upload xception (1).ipynb
Browse files- xception (1).ipynb +1 -0
xception (1).ipynb
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.7.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import tensorflow as tf\nimport numpy as np\nfrom tensorflow import keras\nfrom keras.layers import Input, Lambda, Dense, Flatten, Rescaling\nfrom keras.models import Model","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-09-06T05:09:45.694619Z","iopub.execute_input":"2022-09-06T05:09:45.695823Z","iopub.status.idle":"2022-09-06T05:09:53.064256Z","shell.execute_reply.started":"2022-09-06T05:09:45.695693Z","shell.execute_reply":"2022-09-06T05:09:53.062822Z"},"trusted":true},"execution_count":1,"outputs":[]},{"cell_type":"code","source":"#loading data\ntrain_ds = np.load(\"../input/cats-and-dog-classification/images_train.npy\")\ntest_ds = np.load(\"../input/cats-and-dog-classification/images_test.npy\")\ncv_ds = np.load(\"../input/cats-and-dog-classification/images_valid.npy\")\n\nlabels_train = np.load(\"../input/cats-and-dog-classification/labels_train.npy\")\nlabels_test = np.load(\"../input/cats-and-dog-classification/labels_test.npy\")\nlabels_cv = np.load(\"../input/cats-and-dog-classification/labels_valid.npy\")","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:09:53.067220Z","iopub.execute_input":"2022-09-06T05:09:53.068184Z","iopub.status.idle":"2022-09-06T05:09:55.920253Z","shell.execute_reply.started":"2022-09-06T05:09:53.068131Z","shell.execute_reply":"2022-09-06T05:09:55.918912Z"},"trusted":true},"execution_count":2,"outputs":[]},{"cell_type":"code","source":"len(labels_train)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:09:55.921861Z","iopub.execute_input":"2022-09-06T05:09:55.922245Z","iopub.status.idle":"2022-09-06T05:09:55.934621Z","shell.execute_reply.started":"2022-09-06T05:09:55.922209Z","shell.execute_reply":"2022-09-06T05:09:55.933692Z"},"trusted":true},"execution_count":3,"outputs":[{"execution_count":3,"output_type":"execute_result","data":{"text/plain":"600"},"metadata":{}}]},{"cell_type":"code","source":"cv_ds.shape","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:09:55.937257Z","iopub.execute_input":"2022-09-06T05:09:55.938348Z","iopub.status.idle":"2022-09-06T05:09:55.946604Z","shell.execute_reply.started":"2022-09-06T05:09:55.938293Z","shell.execute_reply":"2022-09-06T05:09:55.945359Z"},"trusted":true},"execution_count":4,"outputs":[{"execution_count":4,"output_type":"execute_result","data":{"text/plain":"(300, 160, 160, 3)"},"metadata":{}}]},{"cell_type":"code","source":"base_model = keras.applications.Xception(\n weights = \"../input/xception/xception_weights_tf_dim_ordering_tf_kernels_notop.h5\", \n input_shape = (160,160,3), \n include_top = False,)\n\nbase_model.trainable = False","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:09:55.948211Z","iopub.execute_input":"2022-09-06T05:09:55.948644Z","iopub.status.idle":"2022-09-06T05:09:59.258077Z","shell.execute_reply.started":"2022-09-06T05:09:55.948609Z","shell.execute_reply":"2022-09-06T05:09:59.256719Z"},"trusted":true},"execution_count":5,"outputs":[{"name":"stderr","text":"2022-09-06 05:09:56.578134: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.\n","output_type":"stream"}]},{"cell_type":"code","source":"#Xception model\n#creating/adding new layers on top of base model\ninputs = keras.Input(shape = (160,160,3))\n#normalizing pixel values\nx = Rescaling(scale = 1/127.5, offset = -1)(inputs)\nx = base_model(x, training = False)\nx = keras.layers.GlobalAveragePooling2D()(x)\noutputs = keras.layers.Dense(1,activation = 'sigmoid')(x)\nmodel = keras.Model(inputs, outputs)\n\nmodel.compile(\n loss = keras.losses.BinaryCrossentropy(),\n optimizer = keras.optimizers.Adam(0.01),\n metrics = [\"accuracy\"]\n)\n\nmodel.summary()","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:09:59.259603Z","iopub.execute_input":"2022-09-06T05:09:59.259928Z","iopub.status.idle":"2022-09-06T05:09:59.729097Z","shell.execute_reply.started":"2022-09-06T05:09:59.259899Z","shell.execute_reply":"2022-09-06T05:09:59.727561Z"},"trusted":true},"execution_count":6,"outputs":[{"name":"stdout","text":"Model: \"model\"\n_________________________________________________________________\nLayer (type) Output Shape Param # \n=================================================================\ninput_2 (InputLayer) [(None, 160, 160, 3)] 0 \n_________________________________________________________________\nrescaling (Rescaling) (None, 160, 160, 3) 0 \n_________________________________________________________________\nxception (Functional) (None, 5, 5, 2048) 20861480 \n_________________________________________________________________\nglobal_average_pooling2d (Gl (None, 2048) 0 \n_________________________________________________________________\ndense (Dense) (None, 1) 2049 \n=================================================================\nTotal params: 20,863,529\nTrainable params: 2,049\nNon-trainable params: 20,861,480\n_________________________________________________________________\n","output_type":"stream"}]},{"cell_type":"code","source":"model.fit(train_ds, labels_train, epochs = 10, batch_size = 64)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:09:59.731158Z","iopub.execute_input":"2022-09-06T05:09:59.731598Z","iopub.status.idle":"2022-09-06T05:14:12.188165Z","shell.execute_reply.started":"2022-09-06T05:09:59.731561Z","shell.execute_reply":"2022-09-06T05:14:12.186496Z"},"trusted":true},"execution_count":7,"outputs":[{"name":"stderr","text":"2022-09-06 05:10:00.075940: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)\n","output_type":"stream"},{"name":"stdout","text":"Epoch 1/10\n10/10 [==============================] - 29s 2s/step - loss: 0.2673 - accuracy: 0.8667\nEpoch 2/10\n10/10 [==============================] - 24s 2s/step - loss: 0.0918 - accuracy: 0.9533\nEpoch 3/10\n10/10 [==============================] - 25s 2s/step - loss: 0.0525 - accuracy: 0.9750\nEpoch 4/10\n10/10 [==============================] - 25s 2s/step - loss: 0.0231 - accuracy: 0.9917\nEpoch 5/10\n10/10 [==============================] - 25s 2s/step - loss: 0.0124 - accuracy: 1.0000\nEpoch 6/10\n10/10 [==============================] - 26s 3s/step - loss: 0.0096 - accuracy: 1.0000\nEpoch 7/10\n10/10 [==============================] - 24s 2s/step - loss: 0.0081 - accuracy: 1.0000\nEpoch 8/10\n10/10 [==============================] - 25s 2s/step - loss: 0.0059 - accuracy: 1.0000\nEpoch 9/10\n10/10 [==============================] - 25s 2s/step - loss: 0.0049 - accuracy: 1.0000\nEpoch 10/10\n10/10 [==============================] - 25s 2s/step - loss: 0.0044 - accuracy: 1.0000\n","output_type":"stream"},{"execution_count":7,"output_type":"execute_result","data":{"text/plain":"<keras.callbacks.History at 0x7fe408657550>"},"metadata":{}}]},{"cell_type":"code","source":"#infereing before fine tuning\nimport time\nstart = time.time()\ny_pred_cv = model.predict(cv_ds)\nend = time.time()","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:14:12.189915Z","iopub.execute_input":"2022-09-06T05:14:12.190308Z","iopub.status.idle":"2022-09-06T05:14:25.858295Z","shell.execute_reply.started":"2022-09-06T05:14:12.190275Z","shell.execute_reply":"2022-09-06T05:14:25.857228Z"},"trusted":true},"execution_count":8,"outputs":[]},{"cell_type":"code","source":"print(\"Time in ms: \",1000*(end-start))","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:14:25.860696Z","iopub.execute_input":"2022-09-06T05:14:25.861706Z","iopub.status.idle":"2022-09-06T05:14:25.869260Z","shell.execute_reply.started":"2022-09-06T05:14:25.861650Z","shell.execute_reply":"2022-09-06T05:14:25.867436Z"},"trusted":true},"execution_count":9,"outputs":[{"name":"stdout","text":"Time in ms: 13663.084030151367\n","output_type":"stream"}]},{"cell_type":"code","source":"y_pred = y_pred_cv\nfor i in range(len(y_pred_cv)):\n if y_pred_cv[i] > 0.5:\n y_pred[i] = 1\n else:\n y_pred[i] = 0","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:14:25.875656Z","iopub.execute_input":"2022-09-06T05:14:25.876858Z","iopub.status.idle":"2022-09-06T05:14:25.885019Z","shell.execute_reply.started":"2022-09-06T05:14:25.876796Z","shell.execute_reply":"2022-09-06T05:14:25.884010Z"},"trusted":true},"execution_count":10,"outputs":[]},{"cell_type":"code","source":"for i in range(len(y_pred_cv)//10):\n print(labels_cv[i], y_pred[i])","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:14:25.887158Z","iopub.execute_input":"2022-09-06T05:14:25.888094Z","iopub.status.idle":"2022-09-06T05:14:25.903935Z","shell.execute_reply.started":"2022-09-06T05:14:25.888043Z","shell.execute_reply":"2022-09-06T05:14:25.902567Z"},"trusted":true},"execution_count":11,"outputs":[{"name":"stdout","text":"0 [0.]\n0 [0.]\n1 [1.]\n1 [0.]\n0 [0.]\n0 [0.]\n0 [0.]\n0 [0.]\n0 [0.]\n1 [1.]\n1 [0.]\n0 [0.]\n1 [1.]\n1 [1.]\n1 [1.]\n1 [1.]\n0 [0.]\n1 [1.]\n0 [0.]\n0 [0.]\n1 [1.]\n1 [1.]\n0 [0.]\n0 [0.]\n0 [0.]\n1 [1.]\n1 [1.]\n1 [1.]\n0 [0.]\n1 [1.]\n","output_type":"stream"}]},{"cell_type":"code","source":"model.evaluate(cv_ds,labels_cv)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:14:25.905874Z","iopub.execute_input":"2022-09-06T05:14:25.906689Z","iopub.status.idle":"2022-09-06T05:14:47.721985Z","shell.execute_reply.started":"2022-09-06T05:14:25.906639Z","shell.execute_reply":"2022-09-06T05:14:47.720580Z"},"trusted":true},"execution_count":12,"outputs":[{"name":"stdout","text":"10/10 [==============================] - 14s 1s/step - loss: 0.1030 - accuracy: 0.9633\n","output_type":"stream"},{"execution_count":12,"output_type":"execute_result","data":{"text/plain":"[0.10299235582351685, 0.9633333086967468]"},"metadata":{}}]},{"cell_type":"code","source":"#function for opening and resizing img\ndef img_pros(path):\n img = open(path,'rb')\n img = img.read()\n img = tf.image.decode_jpeg(img)\n img =tf.image.resize(img, [160,160])\n img = tf.expand_dims(img, axis = 0)\n return img","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:14:47.723778Z","iopub.execute_input":"2022-09-06T05:14:47.727871Z","iopub.status.idle":"2022-09-06T05:14:47.734285Z","shell.execute_reply.started":"2022-09-06T05:14:47.727823Z","shell.execute_reply":"2022-09-06T05:14:47.732728Z"},"trusted":true},"execution_count":13,"outputs":[]},{"cell_type":"code","source":"#testing on cats and dog imgs before fine tuning\n#predicting images of cats from internet\nfrom PIL import Image\nimport tensorflow_datasets as tfds\n\nimg_n = img_pros(\"../input/cat-pic/raoul-droog-yMSecCHsIBc-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [1]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)\n\nimg_n = img_pros(\"../input/catpic/karina-vorozheeva-rW-I87aPY5Y-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [1]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)\n\nimg_n = img_pros(\"../input/catpicn/timothy-meinberg-AL2-t0GrSko-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [1]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:16:34.547424Z","iopub.execute_input":"2022-09-06T05:16:34.547889Z","iopub.status.idle":"2022-09-06T05:16:37.680571Z","shell.execute_reply.started":"2022-09-06T05:16:34.547854Z","shell.execute_reply":"2022-09-06T05:16:37.679249Z"},"trusted":true},"execution_count":15,"outputs":[{"name":"stdout","text":"Time in ms: 288.85865211486816\n[[0.58652806]]\n1/1 [==============================] - 1s 1s/step - loss: 0.5335 - accuracy: 1.0000\nTime in ms: 146.4993953704834\n[[0.9971067]]\n1/1 [==============================] - 0s 129ms/step - loss: 0.0029 - accuracy: 1.0000\nTime in ms: 145.5082893371582\n[[0.00500447]]\n1/1 [==============================] - 0s 125ms/step - loss: 5.2974 - accuracy: 0.0000e+00\n","output_type":"stream"},{"execution_count":15,"output_type":"execute_result","data":{"text/plain":"[5.297418594360352, 0.0]"},"metadata":{}}]},{"cell_type":"code","source":"#testing on cats and dog imgs before fine tuning\n#predicting images of dogs from \n\nimg_n = img_pros(\"../input/dog-pic-n/richard-brutyo-Sg3XwuEpybU-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [0]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)\n\nimg_n = img_pros(\"../input/dogpic/alvan-nee-brFsZ7qszSY-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [0]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:17:33.083394Z","iopub.execute_input":"2022-09-06T05:17:33.084530Z","iopub.status.idle":"2022-09-06T05:17:34.149123Z","shell.execute_reply.started":"2022-09-06T05:17:33.084457Z","shell.execute_reply":"2022-09-06T05:17:34.148294Z"},"trusted":true},"execution_count":16,"outputs":[{"name":"stdout","text":"Time in ms: 150.8650779724121\n[[0.00194362]]\n1/1 [==============================] - 0s 126ms/step - loss: 0.0019 - accuracy: 1.0000\nTime in ms: 143.8894271850586\n[[0.00160024]]\n1/1 [==============================] - 0s 126ms/step - loss: 0.0016 - accuracy: 1.0000\n","output_type":"stream"},{"execution_count":16,"output_type":"execute_result","data":{"text/plain":"[0.0016015038127079606, 1.0]"},"metadata":{}}]},{"cell_type":"code","source":"#fine tuning\n#fine tuning by using a very small learning rate\nbase_model.trainable = True\n\nmodel.compile(\n loss = keras.losses.BinaryCrossentropy(),\n optimizer = keras.optimizers.Adam(1e-5),\n metrics = [\"accuracy\"]\n)\n\nmodel.fit(train_ds, labels_train, epochs = 10, batch_size = 64)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:17:54.339685Z","iopub.execute_input":"2022-09-06T05:17:54.340117Z","iopub.status.idle":"2022-09-06T05:33:16.382368Z","shell.execute_reply.started":"2022-09-06T05:17:54.340079Z","shell.execute_reply":"2022-09-06T05:33:16.380807Z"},"trusted":true},"execution_count":17,"outputs":[{"name":"stdout","text":"Epoch 1/10\n10/10 [==============================] - 100s 9s/step - loss: 0.0039 - accuracy: 1.0000\nEpoch 2/10\n10/10 [==============================] - 91s 9s/step - loss: 5.6470e-04 - accuracy: 1.0000\nEpoch 3/10\n10/10 [==============================] - 92s 9s/step - loss: 2.2898e-04 - accuracy: 1.0000\nEpoch 4/10\n10/10 [==============================] - 91s 9s/step - loss: 1.2756e-04 - accuracy: 1.0000\nEpoch 5/10\n10/10 [==============================] - 91s 9s/step - loss: 8.9888e-05 - accuracy: 1.0000\nEpoch 6/10\n10/10 [==============================] - 92s 9s/step - loss: 6.8200e-05 - accuracy: 1.0000\nEpoch 7/10\n10/10 [==============================] - 92s 9s/step - loss: 5.5783e-05 - accuracy: 1.0000\nEpoch 8/10\n10/10 [==============================] - 91s 9s/step - loss: 4.6846e-05 - accuracy: 1.0000\nEpoch 9/10\n10/10 [==============================] - 91s 9s/step - loss: 4.0850e-05 - accuracy: 1.0000\nEpoch 10/10\n10/10 [==============================] - 91s 9s/step - loss: 3.5488e-05 - accuracy: 1.0000\n","output_type":"stream"},{"execution_count":17,"output_type":"execute_result","data":{"text/plain":"<keras.callbacks.History at 0x7fe3d22ac350>"},"metadata":{}}]},{"cell_type":"code","source":"import time\nstart = time.time()\ny_pred_cv = model.predict(cv_ds)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:33:49.699369Z","iopub.execute_input":"2022-09-06T05:33:49.699937Z","iopub.status.idle":"2022-09-06T05:34:02.241278Z","shell.execute_reply.started":"2022-09-06T05:33:49.699873Z","shell.execute_reply":"2022-09-06T05:34:02.240301Z"},"trusted":true},"execution_count":31,"outputs":[{"name":"stdout","text":"Time in ms: 12530.858755111694\n","output_type":"stream"}]},{"cell_type":"code","source":"model.evaluate(cv_ds,labels_cv)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:34:02.242407Z","iopub.execute_input":"2022-09-06T05:34:02.242817Z","iopub.status.idle":"2022-09-06T05:34:14.875447Z","shell.execute_reply.started":"2022-09-06T05:34:02.242783Z","shell.execute_reply":"2022-09-06T05:34:14.874050Z"},"trusted":true},"execution_count":32,"outputs":[{"name":"stdout","text":"10/10 [==============================] - 13s 1s/step - loss: 0.1364 - accuracy: 0.9633\n","output_type":"stream"},{"execution_count":32,"output_type":"execute_result","data":{"text/plain":"[0.1364215910434723, 0.9633333086967468]"},"metadata":{}}]},{"cell_type":"code","source":"#predicting a image of cat from internet\nfrom PIL import Image\nimport tensorflow_datasets as tfds\n\nsize = (160,160)\nimg = open(\"../input/cat-pic/raoul-droog-yMSecCHsIBc-unsplash.jpg\",'rb')\nimg = img.read()\nimg = tf.image.decode_jpeg(img)\nimg =tf.image.resize(img, [160,160])\nimg = tf.expand_dims(img, axis = 0)\nstart = time.time()\npred = model.predict(img)\nend = time.time()\nprint(1000*(end-start))\nprint(pred)\nlabel = [1]\nlabel = np.array(label)\nmodel.evaluate(img,label)\n\n\n\nimg_n = img_pros(\"../input/catpic/karina-vorozheeva-rW-I87aPY5Y-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [1]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)\n\n\n\nimg_n = img_pros(\"../input/catpicn/timothy-meinberg-AL2-t0GrSko-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [1]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:50:35.175492Z","iopub.execute_input":"2022-09-06T05:50:35.176189Z","iopub.status.idle":"2022-09-06T05:50:37.052199Z","shell.execute_reply.started":"2022-09-06T05:50:35.176144Z","shell.execute_reply":"2022-09-06T05:50:37.050912Z"},"trusted":true},"execution_count":44,"outputs":[{"name":"stdout","text":"179.65960502624512\n[[0.5791096]]\n1/1 [==============================] - 0s 134ms/step - loss: 0.5463 - accuracy: 1.0000\nTime in ms: 165.0869846343994\n[[0.999676]]\n1/1 [==============================] - 0s 128ms/step - loss: 3.2397e-04 - accuracy: 1.0000\nTime in ms: 153.2268524169922\n[[0.00013429]]\n1/1 [==============================] - 0s 129ms/step - loss: 8.9155 - accuracy: 0.0000e+00\n","output_type":"stream"},{"execution_count":44,"output_type":"execute_result","data":{"text/plain":"[8.915472030639648, 0.0]"},"metadata":{}}]},{"cell_type":"code","source":"img_n = img_pros(\"../input/dog-pic-n/richard-brutyo-Sg3XwuEpybU-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [0]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)\n\nimg_n = img_pros(\"../input/dogpic/alvan-nee-brFsZ7qszSY-unsplash.jpg\")\nstart = time.time()\npred_n = model.predict(img_n)\nend = time.time()\nprint(\"Time in ms: \",1000*(end-start))\nprint(pred_n)\nlabel = [0]\nlabel = np.array(label)\nmodel.evaluate(img_n,label)","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:54:29.597245Z","iopub.execute_input":"2022-09-06T05:54:29.598215Z","iopub.status.idle":"2022-09-06T05:54:30.688625Z","shell.execute_reply.started":"2022-09-06T05:54:29.598167Z","shell.execute_reply":"2022-09-06T05:54:30.687620Z"},"trusted":true},"execution_count":46,"outputs":[{"name":"stdout","text":"Time in ms: 179.96501922607422\n[[5.871874e-06]]\n1/1 [==============================] - 0s 132ms/step - loss: 5.8719e-06 - accuracy: 1.0000\nTime in ms: 153.44476699829102\n[[0.00022373]]\n1/1 [==============================] - 0s 130ms/step - loss: 2.2373e-04 - accuracy: 1.0000\n","output_type":"stream"},{"execution_count":46,"output_type":"execute_result","data":{"text/plain":"[0.00022372744570020586, 1.0]"},"metadata":{}}]},{"cell_type":"code","source":"#conisder data augmentation","metadata":{"execution":{"iopub.status.busy":"2022-09-06T05:34:18.464257Z","iopub.execute_input":"2022-09-06T05:34:18.464711Z","iopub.status.idle":"2022-09-06T05:34:18.471064Z","shell.execute_reply.started":"2022-09-06T05:34:18.464673Z","shell.execute_reply":"2022-09-06T05:34:18.469650Z"},"trusted":true},"execution_count":43,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}
|