{"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":"%reload_ext autoreload\n%autoreload 2\n%matplotlib inline","metadata":{"id":"2GBu9L2TbOhz","execution":{"iopub.status.busy":"2022-07-27T14:21:37.265264Z","iopub.execute_input":"2022-07-27T14:21:37.265813Z","iopub.status.idle":"2022-07-27T14:21:37.343011Z","shell.execute_reply.started":"2022-07-27T14:21:37.265700Z","shell.execute_reply":"2022-07-27T14:21:37.342057Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nimport torch\nfrom fastai import *\nfrom fastai.basics import *\nfrom fastai.callback.all import *\nfrom fastai.vision import *\nfrom fastai.vision.all import *\nfrom fastai.metrics import error_rate, accuracy\nimport numpy as np\nimport pandas as pd\nimport matplotlib as plt\nimport random\nfrom PIL import Image","metadata":{"id":"kCVqJrtAbOh8","execution":{"iopub.status.busy":"2022-07-27T14:21:37.345237Z","iopub.execute_input":"2022-07-27T14:21:37.345568Z","iopub.status.idle":"2022-07-27T14:21:40.404672Z","shell.execute_reply.started":"2022-07-27T14:21:37.345535Z","shell.execute_reply":"2022-07-27T14:21:40.403685Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import warnings\nwarnings.filterwarnings('ignore')","metadata":{"id":"FMOQSctObOh-","execution":{"iopub.status.busy":"2022-07-27T14:21:40.406382Z","iopub.execute_input":"2022-07-27T14:21:40.406932Z","iopub.status.idle":"2022-07-27T14:21:40.447759Z","shell.execute_reply.started":"2022-07-27T14:21:40.406895Z","shell.execute_reply":"2022-07-27T14:21:40.446766Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"INPUT = Path(\"../input/Kannada-MNIST\")\nos.listdir(INPUT)","metadata":{"id":"kXhZRkXSbOiA","outputId":"e3617dd3-45de-4d60-ce9c-2785ae1be2bb","execution":{"iopub.status.busy":"2022-07-27T14:21:40.449311Z","iopub.execute_input":"2022-07-27T14:21:40.449990Z","iopub.status.idle":"2022-07-27T14:21:40.499617Z","shell.execute_reply.started":"2022-07-27T14:21:40.449950Z","shell.execute_reply":"2022-07-27T14:21:40.498602Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df = pd.read_csv(INPUT/\"train.csv\")\ntrain_df.head()","metadata":{"id":"T5qZ2biPbOiB","outputId":"8046c186-b34c-4e84-840d-1350c85aa7ff","execution":{"iopub.status.busy":"2022-07-27T14:21:40.502752Z","iopub.execute_input":"2022-07-27T14:21:40.503192Z","iopub.status.idle":"2022-07-27T14:21:45.069824Z","shell.execute_reply.started":"2022-07-27T14:21:40.503162Z","shell.execute_reply":"2022-07-27T14:21:45.068801Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df = pd.read_csv(INPUT/\"test.csv\")\ntest_df.head()","metadata":{"id":"b2rChnIfbOiD","outputId":"797638a2-f657-4622-96bf-efdc01315b4a","execution":{"iopub.status.busy":"2022-07-27T14:21:45.071438Z","iopub.execute_input":"2022-07-27T14:21:45.072043Z","iopub.status.idle":"2022-07-27T14:21:45.471095Z","shell.execute_reply.started":"2022-07-27T14:21:45.072002Z","shell.execute_reply":"2022-07-27T14:21:45.469902Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df = test_df.drop(columns=['id'])\ntest_df.head()","metadata":{"id":"MZGOQkEcbOiF","outputId":"ab94f599-059c-4d7b-a943-a961ff56aead","execution":{"iopub.status.busy":"2022-07-27T14:21:45.472650Z","iopub.execute_input":"2022-07-27T14:21:45.473036Z","iopub.status.idle":"2022-07-27T14:21:45.541692Z","shell.execute_reply.started":"2022-07-27T14:21:45.472997Z","shell.execute_reply":"2022-07-27T14:21:45.540770Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"TRAIN = Path(\"../train\")\nTEST = Path(\"../test\")","metadata":{"id":"wnQCHF6mbOiG","execution":{"iopub.status.busy":"2022-07-27T14:21:45.543310Z","iopub.execute_input":"2022-07-27T14:21:45.543973Z","iopub.status.idle":"2022-07-27T14:21:45.584190Z","shell.execute_reply.started":"2022-07-27T14:21:45.543936Z","shell.execute_reply":"2022-07-27T14:21:45.583127Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for i in range(10):    \n    try:         \n        os.makedirs(TRAIN/str(i))       \n    except:\n        pass","metadata":{"id":"iMhC1sZLbOiH","execution":{"iopub.status.busy":"2022-07-27T14:21:45.585539Z","iopub.execute_input":"2022-07-27T14:21:45.585845Z","iopub.status.idle":"2022-07-27T14:21:45.636685Z","shell.execute_reply.started":"2022-07-27T14:21:45.585813Z","shell.execute_reply":"2022-07-27T14:21:45.635376Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sorted(os.listdir(TRAIN))","metadata":{"id":"PES5QM8ZbOiI","outputId":"eb29c4c6-ad49-4135-a500-90c6da00496e","execution":{"iopub.status.busy":"2022-07-27T14:21:45.638577Z","iopub.execute_input":"2022-07-27T14:21:45.639049Z","iopub.status.idle":"2022-07-27T14:21:45.684010Z","shell.execute_reply.started":"2022-07-27T14:21:45.639013Z","shell.execute_reply":"2022-07-27T14:21:45.681862Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"try:\n    os.makedirs(TEST)\nexcept:\n    pass","metadata":{"id":"umH7AIv4bOiJ","execution":{"iopub.status.busy":"2022-07-27T14:21:45.685537Z","iopub.execute_input":"2022-07-27T14:21:45.686022Z","iopub.status.idle":"2022-07-27T14:21:45.762033Z","shell.execute_reply.started":"2022-07-27T14:21:45.685987Z","shell.execute_reply":"2022-07-27T14:21:45.760817Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"os.listdir(TEST)","metadata":{"id":"4s0lRngVbOiK","outputId":"f487f681-1a50-4706-e014-759b5ad80171","execution":{"iopub.status.busy":"2022-07-27T14:21:45.767626Z","iopub.execute_input":"2022-07-27T14:21:45.768239Z","iopub.status.idle":"2022-07-27T14:21:45.823563Z","shell.execute_reply.started":"2022-07-27T14:21:45.768202Z","shell.execute_reply":"2022-07-27T14:21:45.822512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"if os.path.isdir(TRAIN):\n    print('Train directory has been created')\nelse:\n    print('Train directory creation failed.')\n\nif os.path.isdir(TEST):\n    print('Test directory has been created')\nelse:\n    print('Test directory creation failed.')","metadata":{"id":"KcETV_UobOiL","outputId":"f2c7c178-bc04-49f8-a6a1-f12ab1b7ee89","execution":{"iopub.status.busy":"2022-07-27T14:21:45.826061Z","iopub.execute_input":"2022-07-27T14:21:45.827105Z","iopub.status.idle":"2022-07-27T14:21:45.871452Z","shell.execute_reply.started":"2022-07-27T14:21:45.827066Z","shell.execute_reply":"2022-07-27T14:21:45.870385Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def pix2img(pix_data, filepath):\n    img_mat = pix_data.reshape(28,28)\n    img_mat = img_mat.astype(np.uint8())\n    \n    img_dat = Image.fromarray(img_mat)\n    img_dat.save(filepath)","metadata":{"id":"iIpEAOXLbOiL","execution":{"iopub.status.busy":"2022-07-27T14:21:45.878481Z","iopub.execute_input":"2022-07-27T14:21:45.880578Z","iopub.status.idle":"2022-07-27T14:21:45.922229Z","shell.execute_reply.started":"2022-07-27T14:21:45.880548Z","shell.execute_reply":"2022-07-27T14:21:45.921198Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for idx, data in train_df.iterrows():\n    \n    label, data = data[0], data[1:]\n    folder = TRAIN/str(label)\n    \n    fname = f\"{idx}.jpg\"\n    filepath = folder/fname\n    \n    img_data = data.values\n    \n    pix2img(img_data,filepath)","metadata":{"id":"8a3JlHKkbOiM","execution":{"iopub.status.busy":"2022-07-27T14:21:45.924458Z","iopub.execute_input":"2022-07-27T14:21:45.925660Z","iopub.status.idle":"2022-07-27T14:22:12.180344Z","shell.execute_reply.started":"2022-07-27T14:21:45.925619Z","shell.execute_reply":"2022-07-27T14:22:12.179329Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for idx, data in test_df.iterrows():\n    \n    folder = TEST\n    \n    fname = f\"{idx}.jpg\"\n    filepath = folder/fname\n    \n    img_data = data.values\n    \n    pix2img(img_data,filepath)","metadata":{"id":"NVwcTh6PbOiN","execution":{"iopub.status.busy":"2022-07-27T14:22:12.183941Z","iopub.execute_input":"2022-07-27T14:22:12.184679Z","iopub.status.idle":"2022-07-27T14:22:13.781939Z","shell.execute_reply.started":"2022-07-27T14:22:12.184647Z","shell.execute_reply":"2022-07-27T14:22:13.780959Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plotTrainImage():\n    \n    fig = plt.figure(figsize= (5,10))\n    \n    for rowIdx in range(1,10):\n        \n        foldNum = str(rowIdx)\n        path = TRAIN/foldNum\n        \n        images = os.listdir(path)\n        \n        for sampleIdx in range(1,6):\n            \n            randNum = random.randint(0, len(images)-1)\n            image = Image.open(path/images[randNum])\n            ax = fig.add_subplot(10, 5, 5*rowIdx + sampleIdx)\n            ax.axis(\"off\")\n            \n            plt.imshow(image, cmap='gray')\n            \n    plt.show()","metadata":{"id":"s7OnUxpnbOiO","execution":{"iopub.status.busy":"2022-07-27T14:22:13.783267Z","iopub.execute_input":"2022-07-27T14:22:13.783629Z","iopub.status.idle":"2022-07-27T14:22:13.829948Z","shell.execute_reply.started":"2022-07-27T14:22:13.783594Z","shell.execute_reply":"2022-07-27T14:22:13.828813Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plotTestImage():\n    \n    fig = plt.figure(figsize=(5, 10))    \n    paths = os.listdir(TEST)    \n        \n    for i in range(1, 51):\n        randomNumber = random.randint(0, len(paths)-1)\n        image = Image.open(TEST/paths[randomNumber])\n        \n        ax = fig.add_subplot(10, 5, i)\n        ax.axis(\"off\")\n        \n        plt.imshow(image, cmap='gray')\n    plt.show()","metadata":{"id":"bjfntRRtbOiP","execution":{"iopub.status.busy":"2022-07-27T14:22:13.832997Z","iopub.execute_input":"2022-07-27T14:22:13.833430Z","iopub.status.idle":"2022-07-27T14:22:13.881498Z","shell.execute_reply.started":"2022-07-27T14:22:13.833390Z","shell.execute_reply":"2022-07-27T14:22:13.880425Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"bs = 1024","metadata":{"id":"TuszF5zgbOiQ","execution":{"iopub.status.busy":"2022-07-27T14:22:13.883245Z","iopub.execute_input":"2022-07-27T14:22:13.884128Z","iopub.status.idle":"2022-07-27T14:22:13.928146Z","shell.execute_reply.started":"2022-07-27T14:22:13.884082Z","shell.execute_reply":"2022-07-27T14:22:13.926788Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path = ('../train')\ntest =('../test')","metadata":{"id":"R5R8DYAUbOiQ","execution":{"iopub.status.busy":"2022-07-27T14:22:13.930066Z","iopub.execute_input":"2022-07-27T14:22:13.930999Z","iopub.status.idle":"2022-07-27T14:22:13.978015Z","shell.execute_reply.started":"2022-07-27T14:22:13.930861Z","shell.execute_reply":"2022-07-27T14:22:13.976662Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = ImageDataLoaders.from_folder(path, test=test, valid_pct=0.1, bs=bs)","metadata":{"id":"j0FoNox9bOiR","execution":{"iopub.status.busy":"2022-07-27T14:22:13.981291Z","iopub.execute_input":"2022-07-27T14:22:13.981714Z","iopub.status.idle":"2022-07-27T14:22:21.830456Z","shell.execute_reply.started":"2022-07-27T14:22:13.981674Z","shell.execute_reply":"2022-07-27T14:22:21.829173Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.show_batch()","metadata":{"id":"cqyc-jvibOiR","outputId":"af24c81a-f0e1-4cd8-8195-97500ecc811e","execution":{"iopub.status.busy":"2022-07-27T14:22:21.832327Z","iopub.execute_input":"2022-07-27T14:22:21.833022Z","iopub.status.idle":"2022-07-27T14:22:23.605970Z","shell.execute_reply.started":"2022-07-27T14:22:21.832982Z","shell.execute_reply":"2022-07-27T14:22:23.604876Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn = cnn_learner(data, resnet152, model_dir=\"/tmp/models\",metrics=accuracy)","metadata":{"id":"pckpsBiGbOiS","outputId":"6281dc62-51d4-48d3-bb52-03b404aa74f6","execution":{"iopub.status.busy":"2022-07-27T14:22:23.607622Z","iopub.execute_input":"2022-07-27T14:22:23.608325Z","iopub.status.idle":"2022-07-27T14:22:31.814967Z","shell.execute_reply.started":"2022-07-27T14:22:23.608285Z","shell.execute_reply":"2022-07-27T14:22:31.813830Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.lr_find()","metadata":{"id":"k24DALmCbOiS","outputId":"f7a44042-03ba-4e38-e1db-79bc9bf26589","execution":{"iopub.status.busy":"2022-07-27T14:22:31.816610Z","iopub.execute_input":"2022-07-27T14:22:31.817271Z","iopub.status.idle":"2022-07-27T14:24:47.821159Z","shell.execute_reply.started":"2022-07-27T14:22:31.817231Z","shell.execute_reply":"2022-07-27T14:24:47.819961Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.fit_one_cycle(10, 3e-3)","metadata":{"id":"2Vt5s8PVbOiT","outputId":"4a0f30b7-77d8-4e02-8163-3f9fb11cca95","execution":{"iopub.status.busy":"2022-07-27T14:24:47.825903Z","iopub.execute_input":"2022-07-27T14:24:47.828971Z","iopub.status.idle":"2022-07-27T14:37:51.463109Z","shell.execute_reply.started":"2022-07-27T14:24:47.828925Z","shell.execute_reply":"2022-07-27T14:37:51.461968Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.unfreeze()","metadata":{"id":"Iooe8YEwbOiU","execution":{"iopub.status.busy":"2022-07-27T14:37:51.465142Z","iopub.execute_input":"2022-07-27T14:37:51.465536Z","iopub.status.idle":"2022-07-27T14:37:51.517480Z","shell.execute_reply.started":"2022-07-27T14:37:51.465499Z","shell.execute_reply":"2022-07-27T14:37:51.516335Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.fit_one_cycle(5, 3e-3)","metadata":{"id":"_TSlbyNIbOiU","outputId":"6215a4fe-4e8c-4301-f439-f08d01b5113b","execution":{"iopub.status.busy":"2022-07-27T14:37:51.519065Z","iopub.execute_input":"2022-07-27T14:37:51.520066Z","iopub.status.idle":"2022-07-27T14:43:45.946856Z","shell.execute_reply.started":"2022-07-27T14:37:51.520029Z","shell.execute_reply":"2022-07-27T14:43:45.945804Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.export('kannada-mnist-model.pkl')","metadata":{"id":"jysiLqmBbOiU","execution":{"iopub.status.busy":"2022-07-27T14:43:45.949129Z","iopub.execute_input":"2022-07-27T14:43:45.950362Z","iopub.status.idle":"2022-07-27T14:43:46.712958Z","shell.execute_reply.started":"2022-07-27T14:43:45.950319Z","shell.execute_reply":"2022-07-27T14:43:46.711931Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.show_results()","metadata":{"id":"p8M4GnPLbOiV","outputId":"4196de78-6c25-4c33-ae29-2ff32e089e2d","execution":{"iopub.status.busy":"2022-07-27T14:43:46.714310Z","iopub.execute_input":"2022-07-27T14:43:46.714664Z","iopub.status.idle":"2022-07-27T14:43:48.986934Z","shell.execute_reply.started":"2022-07-27T14:43:46.714629Z","shell.execute_reply":"2022-07-27T14:43:48.985857Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"interp = ClassificationInterpretation.from_learner(learn)\ninterp.plot_confusion_matrix()","metadata":{"id":"GYHM4k3cbOiV","outputId":"6f8440ff-091c-434e-c5b9-1f901768afeb","execution":{"iopub.status.busy":"2022-07-27T14:43:48.991691Z","iopub.execute_input":"2022-07-27T14:43:48.992442Z","iopub.status.idle":"2022-07-27T14:44:02.983949Z","shell.execute_reply.started":"2022-07-27T14:43:48.992394Z","shell.execute_reply":"2022-07-27T14:44:02.982869Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"learn.summary()","metadata":{"id":"Qes25-nUbOiV","outputId":"b004621c-44c1-4692-b7a1-07b25a804d6e","execution":{"iopub.status.busy":"2022-07-27T14:44:02.987310Z","iopub.execute_input":"2022-07-27T14:44:02.987599Z","iopub.status.idle":"2022-07-27T14:44:04.301964Z","shell.execute_reply.started":"2022-07-27T14:44:02.987573Z","shell.execute_reply":"2022-07-27T14:44:04.300804Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"SAMPLE_SUBMISSION = pd.read_csv(INPUT/'sample_submission.csv')\nSAMPLE_SUBMISSION.head()","metadata":{"id":"3zRbFSytbOiW","outputId":"8f9b61bb-a022-4f57-d20c-fb5827f83627","execution":{"iopub.status.busy":"2022-07-27T14:44:04.304032Z","iopub.execute_input":"2022-07-27T14:44:04.304759Z","iopub.status.idle":"2022-07-27T14:44:04.366513Z","shell.execute_reply.started":"2022-07-27T14:44:04.304717Z","shell.execute_reply":"2022-07-27T14:44:04.365584Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = list(Path(r'../test').glob('**/*'))\ntest_dl = data.test_dl(test)","metadata":{"id":"wqMcWAtMbOiW","execution":{"iopub.status.busy":"2022-07-27T14:44:04.368140Z","iopub.execute_input":"2022-07-27T14:44:04.368512Z","iopub.status.idle":"2022-07-27T14:44:04.453983Z","shell.execute_reply.started":"2022-07-27T14:44:04.368476Z","shell.execute_reply":"2022-07-27T14:44:04.452872Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"preds = learn.get_preds(dl=test_dl, with_decoded=True)\npreds = preds[2].tolist()","metadata":{"id":"tVAVOb9dbOiW","outputId":"bfab9d94-040e-4799-8eb9-f67441ac3ea1","execution":{"iopub.status.busy":"2022-07-27T14:44:04.455707Z","iopub.execute_input":"2022-07-27T14:44:04.456093Z","iopub.status.idle":"2022-07-27T14:44:08.402079Z","shell.execute_reply.started":"2022-07-27T14:44:04.456056Z","shell.execute_reply":"2022-07-27T14:44:08.400821Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ids = [int(img.stem) + 1 for img in test]","metadata":{"id":"knN_O7vCbOiX","execution":{"iopub.status.busy":"2022-07-27T14:44:08.404231Z","iopub.execute_input":"2022-07-27T14:44:08.405042Z","iopub.status.idle":"2022-07-27T14:44:08.464933Z","shell.execute_reply.started":"2022-07-27T14:44:08.405000Z","shell.execute_reply":"2022-07-27T14:44:08.463915Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission = pd.DataFrame(ids, columns=['ImageId'])","metadata":{"id":"4q17QTdtbOiX","execution":{"iopub.status.busy":"2022-07-27T14:44:08.467211Z","iopub.execute_input":"2022-07-27T14:44:08.467843Z","iopub.status.idle":"2022-07-27T14:44:08.517588Z","shell.execute_reply.started":"2022-07-27T14:44:08.467799Z","shell.execute_reply":"2022-07-27T14:44:08.516281Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission['Label'] = preds","metadata":{"id":"cHFdUOb_bOiX","execution":{"iopub.status.busy":"2022-07-27T14:44:08.519605Z","iopub.execute_input":"2022-07-27T14:44:08.520581Z","iopub.status.idle":"2022-07-27T14:44:08.568711Z","shell.execute_reply.started":"2022-07-27T14:44:08.520536Z","shell.execute_reply":"2022-07-27T14:44:08.567684Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission","metadata":{"id":"rMV0YIdEbOiY","outputId":"e0dde9a6-78aa-469e-b95d-9cc3e4ec4e81","execution":{"iopub.status.busy":"2022-07-27T14:44:08.573028Z","iopub.execute_input":"2022-07-27T14:44:08.573791Z","iopub.status.idle":"2022-07-27T14:44:08.626859Z","shell.execute_reply.started":"2022-07-27T14:44:08.573759Z","shell.execute_reply":"2022-07-27T14:44:08.625744Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission.to_csv(\"/kaggle/working/submission.csv\",index=False)","metadata":{"id":"1DJxRmQobOiY","execution":{"iopub.status.busy":"2022-07-27T14:45:33.084931Z","iopub.execute_input":"2022-07-27T14:45:33.085643Z","iopub.status.idle":"2022-07-27T14:45:33.138464Z","shell.execute_reply.started":"2022-07-27T14:45:33.085605Z","shell.execute_reply":"2022-07-27T14:45:33.136847Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"! nvidia-smi","metadata":{"id":"YfWkn4d3bOiY","outputId":"9af157b5-40bf-43c1-8ac8-94e6a8a389e3","execution":{"iopub.status.busy":"2022-07-27T14:45:37.104009Z","iopub.execute_input":"2022-07-27T14:45:37.105146Z","iopub.status.idle":"2022-07-27T14:45:37.917350Z","shell.execute_reply.started":"2022-07-27T14:45:37.105098Z","shell.execute_reply":"2022-07-27T14:45:37.916161Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"id":"A_FtgYDibOiY"},"execution_count":null,"outputs":[]}]}