{"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":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-02-16T05:22:35.759206Z","iopub.execute_input":"2022-02-16T05:22:35.759811Z","iopub.status.idle":"2022-02-16T05:22:42.009838Z","shell.execute_reply.started":"2022-02-16T05:22:35.759715Z","shell.execute_reply":"2022-02-16T05:22:42.009119Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install efficientnet-pytorch\nimport pandas as pd \nimport numpy as np \nimport matplotlib.pyplot as plt \nimport torch\nimport torch.nn as nn\nimport albumentations\nimport os\nfrom torch.utils.data import Dataset\nimport cv2\nfrom torch.utils.data import DataLoader\nimport torchvision\nfrom efficientnet_pytorch import EfficientNet\nfrom tqdm import tqdm","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:42.01166Z","iopub.execute_input":"2022-02-16T05:22:42.011917Z","iopub.status.idle":"2022-02-16T05:22:51.024006Z","shell.execute_reply.started":"2022-02-16T05:22:42.011881Z","shell.execute_reply":"2022-02-16T05:22:51.023213Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"PATH = \"../input/plant-pathology-2021-fgvc8/train_images\"\nBATCH_SIZE = 32\nWIDTH = 256\nHEIGHT = 256\nLEARNING_RATE = 3e-4\nDEVICE = \"cuda\" if (torch.cuda.is_available()) else \"cpu\"\nEPOCHS = 10","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.025304Z","iopub.execute_input":"2022-02-16T05:22:51.025575Z","iopub.status.idle":"2022-02-16T05:22:51.058107Z","shell.execute_reply.started":"2022-02-16T05:22:51.025538Z","shell.execute_reply":"2022-02-16T05:22:51.05693Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_augmentation = albumentations.Compose([\n    albumentations.Resize(WIDTH, HEIGHT),\n])\n\nval_augmentation = albumentations.Compose([\n    albumentations.Resize(WIDTH, HEIGHT),\n])","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.060319Z","iopub.execute_input":"2022-02-16T05:22:51.062095Z","iopub.status.idle":"2022-02-16T05:22:51.068283Z","shell.execute_reply.started":"2022-02-16T05:22:51.062053Z","shell.execute_reply":"2022-02-16T05:22:51.06732Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"os.listdir(\"../input/plant-pathology-2021-fgvc8\")","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.070207Z","iopub.execute_input":"2022-02-16T05:22:51.070925Z","iopub.status.idle":"2022-02-16T05:22:51.085423Z","shell.execute_reply.started":"2022-02-16T05:22:51.070884Z","shell.execute_reply":"2022-02-16T05:22:51.084688Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv(\"../input/plant-pathology-2021-fgvc8/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.086591Z","iopub.execute_input":"2022-02-16T05:22:51.087Z","iopub.status.idle":"2022-02-16T05:22:51.110265Z","shell.execute_reply.started":"2022-02-16T05:22:51.086959Z","shell.execute_reply":"2022-02-16T05:22:51.109621Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.111575Z","iopub.execute_input":"2022-02-16T05:22:51.111855Z","iopub.status.idle":"2022-02-16T05:22:51.126332Z","shell.execute_reply.started":"2022-02-16T05:22:51.111816Z","shell.execute_reply":"2022-02-16T05:22:51.125626Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.labels.unique()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.127498Z","iopub.execute_input":"2022-02-16T05:22:51.128245Z","iopub.status.idle":"2022-02-16T05:22:51.136501Z","shell.execute_reply.started":"2022-02-16T05:22:51.128198Z","shell.execute_reply":"2022-02-16T05:22:51.135706Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.labels.value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.138086Z","iopub.execute_input":"2022-02-16T05:22:51.138561Z","iopub.status.idle":"2022-02-16T05:22:51.149458Z","shell.execute_reply.started":"2022-02-16T05:22:51.138524Z","shell.execute_reply":"2022-02-16T05:22:51.148763Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.size","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.152679Z","iopub.execute_input":"2022-02-16T05:22:51.153136Z","iopub.status.idle":"2022-02-16T05:22:51.158683Z","shell.execute_reply.started":"2022-02-16T05:22:51.153099Z","shell.execute_reply":"2022-02-16T05:22:51.158014Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.model_selection import train_test_split","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.160169Z","iopub.execute_input":"2022-02-16T05:22:51.160717Z","iopub.status.idle":"2022-02-16T05:22:51.165256Z","shell.execute_reply.started":"2022-02-16T05:22:51.160678Z","shell.execute_reply":"2022-02-16T05:22:51.164485Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df, val_df = train_test_split(df,test_size = 0.3, random_state = 42 , stratify = df.labels)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.166705Z","iopub.execute_input":"2022-02-16T05:22:51.167294Z","iopub.status.idle":"2022-02-16T05:22:51.206158Z","shell.execute_reply.started":"2022-02-16T05:22:51.167256Z","shell.execute_reply":"2022-02-16T05:22:51.205376Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"val_df.reset_index(inplace = True)  \ntrain_df.reset_index(inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.207731Z","iopub.execute_input":"2022-02-16T05:22:51.208188Z","iopub.status.idle":"2022-02-16T05:22:51.215441Z","shell.execute_reply.started":"2022-02-16T05:22:51.208144Z","shell.execute_reply":"2022-02-16T05:22:51.213895Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"val_df.drop(\"index\", axis = 1, inplace = True)\ntrain_df.drop(\"index\", axis = 1, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.217332Z","iopub.execute_input":"2022-02-16T05:22:51.218262Z","iopub.status.idle":"2022-02-16T05:22:51.231742Z","shell.execute_reply.started":"2022-02-16T05:22:51.218219Z","shell.execute_reply":"2022-02-16T05:22:51.230857Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.preprocessing import OneHotEncoder\noneHot = OneHotEncoder()\noneHot.fit(train_df[[\"labels\"]])\ncategorical = oneHot.transform(train_df[[\"labels\"]]).toarray()\ntemp = pd.DataFrame(categorical,columns =oneHot.categories_[0])\ntrain_df.drop(\"labels\",inplace = True,axis = 1)\ntrain_df = pd.concat([train_df,temp],axis = 1)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.233341Z","iopub.execute_input":"2022-02-16T05:22:51.233895Z","iopub.status.idle":"2022-02-16T05:22:51.257663Z","shell.execute_reply.started":"2022-02-16T05:22:51.233854Z","shell.execute_reply":"2022-02-16T05:22:51.256585Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"oneHot1 = OneHotEncoder()\noneHot1.fit(val_df[[\"labels\"]])\ncategorical = oneHot1.transform(val_df[[\"labels\"]]).toarray()\ntemp = pd.DataFrame(categorical,columns =oneHot1.categories_[0])\nval_df.drop(\"labels\",inplace = True,axis = 1)\nval_df = pd.concat([val_df,temp],axis = 1)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.259061Z","iopub.execute_input":"2022-02-16T05:22:51.259979Z","iopub.status.idle":"2022-02-16T05:22:51.277656Z","shell.execute_reply.started":"2022-02-16T05:22:51.259903Z","shell.execute_reply":"2022-02-16T05:22:51.276303Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.279604Z","iopub.execute_input":"2022-02-16T05:22:51.279977Z","iopub.status.idle":"2022-02-16T05:22:51.307984Z","shell.execute_reply.started":"2022-02-16T05:22:51.279919Z","shell.execute_reply":"2022-02-16T05:22:51.306854Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"val_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.310793Z","iopub.execute_input":"2022-02-16T05:22:51.311238Z","iopub.status.idle":"2022-02-16T05:22:51.339682Z","shell.execute_reply.started":"2022-02-16T05:22:51.311186Z","shell.execute_reply":"2022-02-16T05:22:51.338862Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.shape","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.341415Z","iopub.execute_input":"2022-02-16T05:22:51.342034Z","iopub.status.idle":"2022-02-16T05:22:51.34906Z","shell.execute_reply.started":"2022-02-16T05:22:51.341988Z","shell.execute_reply":"2022-02-16T05:22:51.348062Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"val_df.shape","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.351441Z","iopub.execute_input":"2022-02-16T05:22:51.352163Z","iopub.status.idle":"2022-02-16T05:22:51.359229Z","shell.execute_reply.started":"2022-02-16T05:22:51.352113Z","shell.execute_reply":"2022-02-16T05:22:51.358254Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"class LeafDataset(Dataset):\n    \n    def __init__(self,df,path,augmentation = None):\n        self.df = df\n        self.path = path\n        self.augmentation = augmentation\n        \n    def __len__(self):\n        return len(self.df)\n    \n    def __getitem__(self,index):\n        image = cv2.imread(os.path.join(self.path,self.df[\"image\"][index]))\n        target = torch.tensor((self.df.iloc[0].values[1:]).astype(\"float\"))\n        if self.augmentation:\n            image = self.augmentation(image = image)[\"image\"]\n        image = torch.tensor(image/255.0)\n        image =image.permute(2,0,1)\n        return image.to(device = DEVICE),target.to(device = DEVICE)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.361278Z","iopub.execute_input":"2022-02-16T05:22:51.362043Z","iopub.status.idle":"2022-02-16T05:22:51.373694Z","shell.execute_reply.started":"2022-02-16T05:22:51.361994Z","shell.execute_reply":"2022-02-16T05:22:51.372429Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_dataset = LeafDataset(train_df,PATH,train_augmentation)\nval_dataset = LeafDataset(val_df,PATH,val_augmentation)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.375696Z","iopub.execute_input":"2022-02-16T05:22:51.376573Z","iopub.status.idle":"2022-02-16T05:22:51.382386Z","shell.execute_reply.started":"2022-02-16T05:22:51.37653Z","shell.execute_reply":"2022-02-16T05:22:51.3814Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"(train_dataset[0][0]).shape","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:51.384501Z","iopub.execute_input":"2022-02-16T05:22:51.385193Z","iopub.status.idle":"2022-02-16T05:22:53.609544Z","shell.execute_reply.started":"2022-02-16T05:22:51.385153Z","shell.execute_reply":"2022-02-16T05:22:53.608828Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"(train_dataset[0][1]).shape","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:53.611098Z","iopub.execute_input":"2022-02-16T05:22:53.611608Z","iopub.status.idle":"2022-02-16T05:22:53.760524Z","shell.execute_reply.started":"2022-02-16T05:22:53.61157Z","shell.execute_reply":"2022-02-16T05:22:53.759787Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# plt.imshow(my_dataset[0][0].permute(1,2,0))","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:53.762094Z","iopub.execute_input":"2022-02-16T05:22:53.762635Z","iopub.status.idle":"2022-02-16T05:22:53.766566Z","shell.execute_reply.started":"2022-02-16T05:22:53.762577Z","shell.execute_reply":"2022-02-16T05:22:53.765886Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_loader = DataLoader(train_dataset,shuffle = True, batch_size = BATCH_SIZE)\nval_loader = DataLoader(val_dataset,shuffle = True, batch_size = BATCH_SIZE)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:53.768422Z","iopub.execute_input":"2022-02-16T05:22:53.769464Z","iopub.status.idle":"2022-02-16T05:22:53.775472Z","shell.execute_reply.started":"2022-02-16T05:22:53.769429Z","shell.execute_reply":"2022-02-16T05:22:53.774662Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = next(iter(train_loader))","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:53.777Z","iopub.execute_input":"2022-02-16T05:22:53.778034Z","iopub.status.idle":"2022-02-16T05:22:58.097976Z","shell.execute_reply.started":"2022-02-16T05:22:53.777993Z","shell.execute_reply":"2022-02-16T05:22:58.097223Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp[0][0].shape","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.102486Z","iopub.execute_input":"2022-02-16T05:22:58.102984Z","iopub.status.idle":"2022-02-16T05:22:58.110257Z","shell.execute_reply.started":"2022-02-16T05:22:58.102911Z","shell.execute_reply":"2022-02-16T05:22:58.109597Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.imshow(temp[0][0].permute(1,2,0).cpu())","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.111357Z","iopub.execute_input":"2022-02-16T05:22:58.112378Z","iopub.status.idle":"2022-02-16T05:22:58.374434Z","shell.execute_reply.started":"2022-02-16T05:22:58.112337Z","shell.execute_reply":"2022-02-16T05:22:58.370346Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"class MyModel(nn.Module):\n    \n    def __init__(self , output_dims):\n        super().__init__()\n        self.model = EfficientNet.from_pretrained(\"efficientnet-b0\")\n        self.out = nn.Linear(1280,output_dims)\n        self.dropout = nn.Dropout(0.1)\n        \n    def forward(self,x):\n        z = self.model.extract_features(x)\n        z = nn.functional.adaptive_avg_pool2d(z,1)\n        z = torch.flatten(z,1)\n        z = self.out(self.dropout(z))\n        return z","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.376007Z","iopub.execute_input":"2022-02-16T05:22:58.376538Z","iopub.status.idle":"2022-02-16T05:22:58.384779Z","shell.execute_reply.started":"2022-02-16T05:22:58.376499Z","shell.execute_reply":"2022-02-16T05:22:58.384005Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model = MyModel(len(df.labels.unique()))","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.386801Z","iopub.execute_input":"2022-02-16T05:22:58.387551Z","iopub.status.idle":"2022-02-16T05:22:58.513975Z","shell.execute_reply.started":"2022-02-16T05:22:58.387511Z","shell.execute_reply":"2022-02-16T05:22:58.513109Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model(torch.rand([1,3,256,256])).shape","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.515409Z","iopub.execute_input":"2022-02-16T05:22:58.515825Z","iopub.status.idle":"2022-02-16T05:22:58.697702Z","shell.execute_reply.started":"2022-02-16T05:22:58.515786Z","shell.execute_reply":"2022-02-16T05:22:58.696778Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.to(device = DEVICE)\nmodel.double()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.699395Z","iopub.execute_input":"2022-02-16T05:22:58.699682Z","iopub.status.idle":"2022-02-16T05:22:58.744684Z","shell.execute_reply.started":"2022-02-16T05:22:58.699644Z","shell.execute_reply":"2022-02-16T05:22:58.743886Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"loss_fn = nn.BCEWithLogitsLoss()\noptimizer = torch.optim.Adam(model.parameters(),lr = LEARNING_RATE)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.745825Z","iopub.execute_input":"2022-02-16T05:22:58.746039Z","iopub.status.idle":"2022-02-16T05:22:58.753009Z","shell.execute_reply.started":"2022-02-16T05:22:58.746014Z","shell.execute_reply":"2022-02-16T05:22:58.751988Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def training(x,y):\n    model.train()\n    prediction = model(x)\n    batch_loss = loss_fn(prediction , y)\n    batch_loss.backward()\n    optimizer.step()\n    optimizer.zero_grad()\n    return batch_loss.item()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.754845Z","iopub.execute_input":"2022-02-16T05:22:58.755213Z","iopub.status.idle":"2022-02-16T05:22:58.761886Z","shell.execute_reply.started":"2022-02-16T05:22:58.755174Z","shell.execute_reply":"2022-02-16T05:22:58.761163Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"@torch.no_grad()\ndef accuracy(x,y):\n    model.eval()\n    prediction = model(x)\n    is_correct = ( (prediction>0.5) == y)\n    return is_correct.cpu().numpy()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.76338Z","iopub.execute_input":"2022-02-16T05:22:58.764381Z","iopub.status.idle":"2022-02-16T05:22:58.770125Z","shell.execute_reply.started":"2022-02-16T05:22:58.764341Z","shell.execute_reply":"2022-02-16T05:22:58.769192Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"@torch.no_grad()\ndef loss_validation(x,y):\n    model.eval()\n    prediction = model(x)\n    loss = loss_fn(prediction , y)\n    return loss.item()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:22:58.771722Z","iopub.execute_input":"2022-02-16T05:22:58.772469Z","iopub.status.idle":"2022-02-16T05:22:58.779543Z","shell.execute_reply.started":"2022-02-16T05:22:58.772428Z","shell.execute_reply":"2022-02-16T05:22:58.778577Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"loss_train = []\nloss_val = []\naccuracy_train = []\naccuracy_val = []\n\ndef train():\n    for epoch in range(EPOCHS):\n        loss_train_epoch = [] \n        loss_val_epoch = []\n        accuracy_train_epoch = []\n        accuracy_val_epoch = []\n        for batch in tqdm(train_loader,position=0, leave=True):\n            x,y = batch\n            loss = training(x,y)\n            acc = accuracy(x,y).sum()\n            loss_train_epoch.append(loss)\n            accuracy_train_epoch.append(acc)\n            \n        for index,batch in enumerate(val_loader):\n            x,y = batch\n            loss = loss_validation(x,y)\n            acc = accuracy(x,y).sum()\n            loss_val_epoch.append(loss)\n            accuracy_val_epoch.append(acc)\n            \n        loss_train.append(sum(loss_train_epoch))\n        loss_val.append(sum(loss_val_epoch))\n        accuracy_train.append(sum(accuracy_train_epoch))\n        accuracy_val.append(sum(accuracy_val_epoch))\n        \n    ","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:59:52.664421Z","iopub.execute_input":"2022-02-16T05:59:52.664687Z","iopub.status.idle":"2022-02-16T05:59:52.674833Z","shell.execute_reply.started":"2022-02-16T05:59:52.664658Z","shell.execute_reply":"2022-02-16T05:59:52.672773Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train()","metadata":{"execution":{"iopub.status.busy":"2022-02-16T05:59:52.676686Z","iopub.execute_input":"2022-02-16T05:59:52.677053Z","iopub.status.idle":"2022-02-16T09:11:16.884162Z","shell.execute_reply.started":"2022-02-16T05:59:52.677002Z","shell.execute_reply":"2022-02-16T09:11:16.880835Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"loss_train","metadata":{"execution":{"iopub.status.busy":"2022-02-16T09:11:20.048852Z","iopub.execute_input":"2022-02-16T09:11:20.04938Z","iopub.status.idle":"2022-02-16T09:11:20.054543Z","shell.execute_reply.started":"2022-02-16T09:11:20.04934Z","shell.execute_reply":"2022-02-16T09:11:20.053707Z"},"trusted":true},"execution_count":null,"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":[]},{"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":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}