{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":59093,"databundleVersionId":7469972,"sourceType":"competition"}],"dockerImageVersionId":30635,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"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\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":"2024-01-21T19:32:23.578443Z","iopub.execute_input":"2024-01-21T19:32:23.578811Z","iopub.status.idle":"2024-01-21T19:32:24.594130Z","shell.execute_reply.started":"2024-01-21T19:32:23.578780Z","shell.execute_reply":"2024-01-21T19:32:24.593253Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\nimport numpy as np\nfrom tqdm import tqdm\nimport os","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:24.596038Z","iopub.execute_input":"2024-01-21T19:32:24.596551Z","iopub.status.idle":"2024-01-21T19:32:24.606622Z","shell.execute_reply.started":"2024-01-21T19:32:24.596505Z","shell.execute_reply":"2024-01-21T19:32:24.605615Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv(\"/kaggle/input/hms-harmful-brain-activity-classification/train.csv\")\ntargets = df.columns[9:]\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:24.607688Z","iopub.execute_input":"2024-01-21T19:32:24.607926Z","iopub.status.idle":"2024-01-21T19:32:24.890261Z","shell.execute_reply.started":"2024-01-21T19:32:24.607903Z","shell.execute_reply":"2024-01-21T19:32:24.889367Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"targets","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:24.893088Z","iopub.execute_input":"2024-01-21T19:32:24.893424Z","iopub.status.idle":"2024-01-21T19:32:24.902934Z","shell.execute_reply.started":"2024-01-21T19:32:24.893398Z","shell.execute_reply":"2024-01-21T19:32:24.901904Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:24.904122Z","iopub.execute_input":"2024-01-21T19:32:24.904422Z","iopub.status.idle":"2024-01-21T19:32:24.940825Z","shell.execute_reply.started":"2024-01-21T19:32:24.904397Z","shell.execute_reply":"2024-01-21T19:32:24.939871Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Making a new train dataframe which only contains one of the eegid no the repeated one","metadata":{}},{"cell_type":"code","source":"train = df.groupby(\"eeg_id\")[[\"spectrogram_id\",\"spectrogram_label_offset_seconds\"]].agg({\"spectrogram_id\":\"first\",\"spectrogram_label_offset_seconds\":\"min\"})\nx = df.groupby(\"eeg_id\")[[\"spectrogram_label_offset_seconds\"]].agg({\"spectrogram_label_offset_seconds\":\"max\"})\ntrain.columns = [\"spec_id\",\"min\"]\ntrain[\"max\"] = x\nx = df.groupby(\"eeg_id\")[[\"patient_id\"]].agg({\"patient_id\":\"first\"})\ntrain[\"patient_id\"] = x\nx = df.groupby(\"eeg_id\")[targets].agg(\"sum\")\nfor t in targets:\n    train[t] = x[t]\ny_data = train[targets].values\ny_data = y_data / y_data.sum(axis=1,keepdims=True)\ntrain[targets] = y_data\ntmp = df.groupby('eeg_id')[['expert_consensus']].agg('first')\ntrain['target'] = tmp\n\ntrain = train.reset_index()\nprint('Train non-overlapp eeg_id shape:', train.shape )\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:24.942009Z","iopub.execute_input":"2024-01-21T19:32:24.942353Z","iopub.status.idle":"2024-01-21T19:32:25.145859Z","shell.execute_reply.started":"2024-01-21T19:32:24.942318Z","shell.execute_reply":"2024-01-21T19:32:25.144766Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:25.147457Z","iopub.execute_input":"2024-01-21T19:32:25.147879Z","iopub.status.idle":"2024-01-21T19:32:25.178832Z","shell.execute_reply.started":"2024-01-21T19:32:25.147838Z","shell.execute_reply":"2024-01-21T19:32:25.177826Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = \"/kaggle/input/hms-harmful-brain-activity-classification/train_spectrograms\"\nspec = {}\nfor i in tqdm(os.listdir(spectrogram)):\n    imagepath = os.path.join(spectrogram,i)\n    ss = pd.read_parquet(imagepath)\n    spec[i] = ss\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:32:25.180073Z","iopub.execute_input":"2024-01-21T19:32:25.180462Z","iopub.status.idle":"2024-01-21T19:40:49.222190Z","shell.execute_reply.started":"2024-01-21T19:32:25.180424Z","shell.execute_reply":"2024-01-21T19:40:49.221245Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"imagesample = np.zeros(shape = (128,256,4))","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.223398Z","iopub.execute_input":"2024-01-21T19:40:49.223718Z","iopub.status.idle":"2024-01-21T19:40:49.228594Z","shell.execute_reply.started":"2024-01-21T19:40:49.223689Z","shell.execute_reply":"2024-01-21T19:40:49.227574Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"imagesinfo = np.zeros(shape = (len(train),128,256,4))","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.234047Z","iopub.execute_input":"2024-01-21T19:40:49.234353Z","iopub.status.idle":"2024-01-21T19:40:49.240849Z","shell.execute_reply.started":"2024-01-21T19:40:49.234298Z","shell.execute_reply":"2024-01-21T19:40:49.239935Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"targets","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.242014Z","iopub.execute_input":"2024-01-21T19:40:49.242340Z","iopub.status.idle":"2024-01-21T19:40:49.252592Z","shell.execute_reply.started":"2024-01-21T19:40:49.242280Z","shell.execute_reply":"2024-01-21T19:40:49.251605Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tars = {'Seizure':0, 'LPD':1, 'GPD':2, 'LRDA':3, 'GRDA':4, 'Other':5}","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.253752Z","iopub.execute_input":"2024-01-21T19:40:49.254431Z","iopub.status.idle":"2024-01-21T19:40:49.263182Z","shell.execute_reply.started":"2024-01-21T19:40:49.254401Z","shell.execute_reply":"2024-01-21T19:40:49.262311Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train[\"target\"].unique()","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.264334Z","iopub.execute_input":"2024-01-21T19:40:49.264694Z","iopub.status.idle":"2024-01-21T19:40:49.276043Z","shell.execute_reply.started":"2024-01-21T19:40:49.264644Z","shell.execute_reply":"2024-01-21T19:40:49.275188Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y = train[\"target\"].map(tars)\ny = np.array(y)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.277363Z","iopub.execute_input":"2024-01-21T19:40:49.277705Z","iopub.status.idle":"2024-01-21T19:40:49.286327Z","shell.execute_reply.started":"2024-01-21T19:40:49.277672Z","shell.execute_reply":"2024-01-21T19:40:49.285540Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.287540Z","iopub.execute_input":"2024-01-21T19:40:49.287843Z","iopub.status.idle":"2024-01-21T19:40:49.297738Z","shell.execute_reply.started":"2024-01-21T19:40:49.287816Z","shell.execute_reply":"2024-01-21T19:40:49.296841Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import torch\nimport torch.nn as nn\nfrom torchvision import models,transforms\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:49.299056Z","iopub.execute_input":"2024-01-21T19:40:49.299467Z","iopub.status.idle":"2024-01-21T19:40:53.318047Z","shell.execute_reply.started":"2024-01-21T19:40:49.299430Z","shell.execute_reply":"2024-01-21T19:40:53.317011Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"class CustomDataset():\n    def __init__(self,train,y,spec):\n        self.train = train\n        self.targets = y\n        self.spec = spec\n        #self.transform = transform\n    def __len__(self):\n        return len(self.targets)\n    def __getitem__(self,idx):\n        sample = self.spec[str(self.train[\"spec_id\"][idx])+\".parquet\"]\n        r = int((self.train[\"min\"][idx]+self.train[\"max\"][idx])//4)\n        imageinfo = np.zeros(shape = (128,256,4))\n        for k in range(4):\n            window = sample.drop(\"time\",axis =1).iloc[r:r+300,k:k+100]\n            window = np.clip(window,np.exp(-4),np.exp(8))\n            window = np.log(window)\n            window = np.array(window)\n            mean = np.mean(window.flatten())\n            std = np.std(window.flatten())\n            window = ((window-mean)/std)\n            window = np.nan_to_num(window,nan =0.0)\n            window = window.T\n            imageinfo[14:-14,:,k] = window[:,22:-22]\n        imageinfo = imageinfo.transpose()\n        return{\n            \"data\":torch.tensor(imageinfo,dtype = torch.float32).to(\"cuda\"),\n            \"target\":torch.tensor(self.targets[idx]).to(\"cuda\")\n        }\n    ","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.319445Z","iopub.execute_input":"2024-01-21T19:40:53.319941Z","iopub.status.idle":"2024-01-21T19:40:53.331901Z","shell.execute_reply.started":"2024-01-21T19:40:53.319897Z","shell.execute_reply":"2024-01-21T19:40:53.330712Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customdataset = CustomDataset(train,y,spec)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.333047Z","iopub.execute_input":"2024-01-21T19:40:53.333351Z","iopub.status.idle":"2024-01-21T19:40:53.342985Z","shell.execute_reply.started":"2024-01-21T19:40:53.333318Z","shell.execute_reply":"2024-01-21T19:40:53.342085Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(customdataset)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.344036Z","iopub.execute_input":"2024-01-21T19:40:53.344587Z","iopub.status.idle":"2024-01-21T19:40:53.353322Z","shell.execute_reply.started":"2024-01-21T19:40:53.344555Z","shell.execute_reply":"2024-01-21T19:40:53.352432Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customdataset[0][\"data\"].shape","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.354428Z","iopub.execute_input":"2024-01-21T19:40:53.354728Z","iopub.status.idle":"2024-01-21T19:40:53.671192Z","shell.execute_reply.started":"2024-01-21T19:40:53.354702Z","shell.execute_reply":"2024-01-21T19:40:53.670251Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from torchvision import transforms\ntransform = transforms.Compose([\n    transforms.ToTensor(),\n    transforms.RandomHorizontalFlip(),\n])\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.672351Z","iopub.execute_input":"2024-01-21T19:40:53.672670Z","iopub.status.idle":"2024-01-21T19:40:53.677616Z","shell.execute_reply.started":"2024-01-21T19:40:53.672643Z","shell.execute_reply":"2024-01-21T19:40:53.676475Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"traindataset = CustomDataset(train,y,spec)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.679114Z","iopub.execute_input":"2024-01-21T19:40:53.679520Z","iopub.status.idle":"2024-01-21T19:40:53.687972Z","shell.execute_reply.started":"2024-01-21T19:40:53.679480Z","shell.execute_reply":"2024-01-21T19:40:53.687063Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(traindataset)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.689333Z","iopub.execute_input":"2024-01-21T19:40:53.689927Z","iopub.status.idle":"2024-01-21T19:40:53.702525Z","shell.execute_reply.started":"2024-01-21T19:40:53.689881Z","shell.execute_reply":"2024-01-21T19:40:53.701672Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"traindataset[0][\"data\"].shape","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.703852Z","iopub.execute_input":"2024-01-21T19:40:53.704279Z","iopub.status.idle":"2024-01-21T19:40:53.761932Z","shell.execute_reply.started":"2024-01-21T19:40:53.704246Z","shell.execute_reply":"2024-01-21T19:40:53.761189Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from torch.utils.data import DataLoader","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.762947Z","iopub.execute_input":"2024-01-21T19:40:53.763199Z","iopub.status.idle":"2024-01-21T19:40:53.767166Z","shell.execute_reply.started":"2024-01-21T19:40:53.763176Z","shell.execute_reply":"2024-01-21T19:40:53.766244Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"TrainLoader = DataLoader(traindataset,batch_size = 32)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.768555Z","iopub.execute_input":"2024-01-21T19:40:53.768932Z","iopub.status.idle":"2024-01-21T19:40:53.775722Z","shell.execute_reply.started":"2024-01-21T19:40:53.768899Z","shell.execute_reply":"2024-01-21T19:40:53.774823Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import torchvision.models as models\nresnet50 = models.resnet50(pretrained=True)\nresnet50.conv1 = torch.nn.Conv2d(4, 64, kernel_size=7, stride=2, padding=3, bias=False)\nnum_classes = 6\nresnet50.fc = nn.Sequential(\n    torch.nn.Linear(resnet50.fc.in_features, num_classes),\n    nn.Softmax(dim=1)\n)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:53.776788Z","iopub.execute_input":"2024-01-21T19:40:53.777044Z","iopub.status.idle":"2024-01-21T19:40:54.839070Z","shell.execute_reply.started":"2024-01-21T19:40:53.777021Z","shell.execute_reply":"2024-01-21T19:40:54.838228Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"input_data = torch.rand((32, 4, 128, 256))\noutput = resnet50(input_data)\nprint(output.shape)","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:54.843866Z","iopub.execute_input":"2024-01-21T19:40:54.844144Z","iopub.status.idle":"2024-01-21T19:40:57.584917Z","shell.execute_reply.started":"2024-01-21T19:40:54.844119Z","shell.execute_reply":"2024-01-21T19:40:57.583938Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"output[0].sum()","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.586128Z","iopub.execute_input":"2024-01-21T19:40:57.586460Z","iopub.status.idle":"2024-01-21T19:40:57.611183Z","shell.execute_reply.started":"2024-01-21T19:40:57.586431Z","shell.execute_reply":"2024-01-21T19:40:57.610409Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def trainer(model,trainloader,optimizer,criterion):\n  model.train()\n  iterationloss = 0\n  counter = 0\n  for data in tqdm(trainloader):\n    message = data['data']\n    target = data['target']\n    optimizer.zero_grad()\n    out = model(message)\n    loss = criterion(out,target)\n    loss.backward()\n    optimizer.step()\n    iterationloss+=loss.item()*message.shape[0]\n    counter+=message.shape[0]\n  return iterationloss/counter","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.612162Z","iopub.execute_input":"2024-01-21T19:40:57.612447Z","iopub.status.idle":"2024-01-21T19:40:57.618416Z","shell.execute_reply.started":"2024-01-21T19:40:57.612421Z","shell.execute_reply":"2024-01-21T19:40:57.617450Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def tester(model,testloader,criterion):\n  model.eval()\n  iterationloss = 0\n  counter = 0\n  for data in testloader:\n    message = data['data']\n    target = data['target'].view(-1,1).float()\n    with torch.no_grad():\n      out = model(message)\n      loss = criterion(out,target)\n      iterationloss+=loss*message.shape[0]\n    counter+=message.shape[0]\n  return iterationloss/counter\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.619589Z","iopub.execute_input":"2024-01-21T19:40:57.620260Z","iopub.status.idle":"2024-01-21T19:40:57.628008Z","shell.execute_reply.started":"2024-01-21T19:40:57.620227Z","shell.execute_reply":"2024-01-21T19:40:57.627228Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"resnet50.to(\"cuda\")","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.629085Z","iopub.execute_input":"2024-01-21T19:40:57.629531Z","iopub.status.idle":"2024-01-21T19:40:57.678565Z","shell.execute_reply.started":"2024-01-21T19:40:57.629504Z","shell.execute_reply":"2024-01-21T19:40:57.677729Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"meramodel = resnet50\nepochs = 10\nlr = 1e-3\noptimizer = torch.optim.Adam(meramodel.parameters(), lr=lr)\ncriterion = nn.CrossEntropyLoss()  \nscheduler = torch.optim.lr_scheduler.ExponentialLR(optimizer=optimizer, gamma=0.9)\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.679618Z","iopub.execute_input":"2024-01-21T19:40:57.679892Z","iopub.status.idle":"2024-01-21T19:40:57.685905Z","shell.execute_reply.started":"2024-01-21T19:40:57.679867Z","shell.execute_reply":"2024-01-21T19:40:57.684972Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"meramodel.to(\"cuda\")","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.687107Z","iopub.execute_input":"2024-01-21T19:40:57.687417Z","iopub.status.idle":"2024-01-21T19:40:57.703065Z","shell.execute_reply.started":"2024-01-21T19:40:57.687392Z","shell.execute_reply":"2024-01-21T19:40:57.702004Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import warnings\n\ndef fxn():\n    warnings.warn(\"deprecated\", DeprecationWarning)\n\nwith warnings.catch_warnings():\n    warnings.simplefilter(\"ignore\")\n    fxn()\n\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.703967Z","iopub.execute_input":"2024-01-21T19:40:57.705506Z","iopub.status.idle":"2024-01-21T19:40:57.710402Z","shell.execute_reply.started":"2024-01-21T19:40:57.705480Z","shell.execute_reply":"2024-01-21T19:40:57.709410Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"epochs = 15\ntrain_loss = []\nval_loss = []\nbestloss = np.inf\nfor i in (range(epochs)):\n    print(\"-\"*120)\n    print(\"Began iteration no.\",i+1)\n    print(\":\"*50,\"=\"*20,\":\"*50)\n    trainloss = trainer(meramodel,TrainLoader,optimizer,criterion)\n    train_loss.append(trainloss)\n    print(\"train loss = \",trainloss)\n    print(\"=\"*80,\"\\n\")\n    if trainloss<bestloss:\n        bestloss = trainloss\n        dic = {\n        'model': meramodel.state_dict()\n        }\n        torch.save(dic,'./Bestmodel.model')\n        print(\"Improved and saved the model\\n\")\n        print(\"=\"*80)\n    print(\"=\"*100)\n\n","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:40:57.711641Z","iopub.execute_input":"2024-01-21T19:40:57.712189Z","iopub.status.idle":"2024-01-21T19:42:14.330710Z","shell.execute_reply.started":"2024-01-21T19:40:57.712156Z","shell.execute_reply":"2024-01-21T19:42:14.328996Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for i in TrainLoader:\n    print(i[\"data\"].shape)\n    break","metadata":{"execution":{"iopub.status.busy":"2024-01-21T19:42:14.331739Z","iopub.status.idle":"2024-01-21T19:42:14.332195Z","shell.execute_reply.started":"2024-01-21T19:42:14.331954Z","shell.execute_reply":"2024-01-21T19:42:14.331977Z"},"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":[]},{"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":[]}]}