{"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":[{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\n\nfrom keras import layers\nfrom keras import models\nfrom keras import optimizers\nfrom keras.preprocessing.image import load_img, img_to_array, ImageDataGenerator\nfrom keras import applications\n\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn import metrics\n\nimport glob\nimport os\nprint(\"Cats&Dogs Dataset Folder Contain:\",os.listdir(\"../input\"))","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-08-21T16:36:33.478727Z","iopub.execute_input":"2021-08-21T16:36:33.479262Z","iopub.status.idle":"2021-08-21T16:36:41.03884Z","shell.execute_reply.started":"2021-08-21T16:36:33.479205Z","shell.execute_reply":"2021-08-21T16:36:41.037527Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(os.listdir('../input'))","metadata":{"execution":{"iopub.status.busy":"2021-08-21T16:37:55.857297Z","iopub.execute_input":"2021-08-21T16:37:55.857666Z","iopub.status.idle":"2021-08-21T16:37:55.863199Z","shell.execute_reply.started":"2021-08-21T16:37:55.857635Z","shell.execute_reply":"2021-08-21T16:37:55.862314Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"targets=list()\nfull_paths=list()\nfor file_name in FILE_NAMES:\n    target=file_name.split(\".\")[0]\n    full_path=os.path.join(IMAGE_FOLDER_PATH, file_name)\n    full_paths.append(full_path)\n    targets.append(target)\n\ndataset=pd.DataFrame()\ndataset['image_path']=full_paths\ndataset['target']=targets","metadata":{"execution":{"iopub.status.busy":"2021-08-21T16:39:11.497648Z","iopub.execute_input":"2021-08-21T16:39:11.498005Z","iopub.status.idle":"2021-08-21T16:39:11.53183Z","shell.execute_reply.started":"2021-08-21T16:39:11.497976Z","shell.execute_reply":"2021-08-21T16:39:11.530188Z"},"trusted":true},"execution_count":null,"outputs":[]}]}