amanmibra commited on
Commit
c63e93b
1 Parent(s): ee5cb13

Removed gitignored directories

Browse files
__pycache__/cnn.cpython-39.pyc DELETED
Binary file (1.36 kB)
 
__pycache__/dataset.cpython-39.pyc DELETED
Binary file (3.06 kB)
 
notebooks/.ipynb_checkpoints/playground-checkpoint.ipynb DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "cells": [],
3
- "metadata": {},
4
- "nbformat": 4,
5
- "nbformat_minor": 5
6
- }
 
 
 
 
 
 
 
notebooks/playground.ipynb CHANGED
@@ -3,7 +3,7 @@
3
  {
4
  "cell_type": "code",
5
  "execution_count": 8,
6
- "id": "55895dc1",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
@@ -14,7 +14,7 @@
14
  {
15
  "cell_type": "code",
16
  "execution_count": 10,
17
- "id": "d1e95c40",
18
  "metadata": {},
19
  "outputs": [],
20
  "source": [
@@ -25,7 +25,7 @@
25
  {
26
  "cell_type": "code",
27
  "execution_count": 86,
28
- "id": "0ae6ce32",
29
  "metadata": {},
30
  "outputs": [],
31
  "source": [
@@ -38,7 +38,7 @@
38
  {
39
  "cell_type": "code",
40
  "execution_count": 85,
41
- "id": "4200acc4",
42
  "metadata": {},
43
  "outputs": [],
44
  "source": [
@@ -49,7 +49,7 @@
49
  {
50
  "cell_type": "code",
51
  "execution_count": 78,
52
- "id": "b98d408a",
53
  "metadata": {},
54
  "outputs": [
55
  {
@@ -70,8 +70,8 @@
70
  },
71
  {
72
  "cell_type": "code",
73
- "execution_count": 97,
74
- "id": "f26723ab",
75
  "metadata": {},
76
  "outputs": [],
77
  "source": [
@@ -86,17 +86,17 @@
86
  },
87
  {
88
  "cell_type": "code",
89
- "execution_count": 93,
90
- "id": "7664a918",
91
  "metadata": {},
92
  "outputs": [
93
  {
94
  "data": {
95
  "text/plain": [
96
- "5718"
97
  ]
98
  },
99
- "execution_count": 93,
100
  "metadata": {},
101
  "output_type": "execute_result"
102
  }
@@ -107,8 +107,8 @@
107
  },
108
  {
109
  "cell_type": "code",
110
- "execution_count": 82,
111
- "id": "0adfe082",
112
  "metadata": {},
113
  "outputs": [
114
  {
@@ -121,10 +121,10 @@
121
  " [0.5154, 0.3950, 0.4497, ..., 0.4916, 0.4505, 0.7709],\n",
122
  " [0.1919, 0.4804, 0.5144, ..., 0.5931, 0.4466, 0.4706],\n",
123
  " [0.1208, 0.4357, 0.4016, ..., 0.5168, 0.7007, 0.3696]]]),\n",
124
- " 'aman')"
125
  ]
126
  },
127
- "execution_count": 82,
128
  "metadata": {},
129
  "output_type": "execute_result"
130
  }
@@ -135,8 +135,8 @@
135
  },
136
  {
137
  "cell_type": "code",
138
- "execution_count": 83,
139
- "id": "6f095274",
140
  "metadata": {},
141
  "outputs": [
142
  {
@@ -145,7 +145,7 @@
145
  "torch.Size([1, 64, 157])"
146
  ]
147
  },
148
- "execution_count": 83,
149
  "metadata": {},
150
  "output_type": "execute_result"
151
  }
@@ -156,42 +156,24 @@
156
  },
157
  {
158
  "cell_type": "code",
159
- "execution_count": 87,
160
- "id": "362d6f74",
161
  "metadata": {},
162
  "outputs": [
163
  {
164
- "name": "stdout",
165
- "output_type": "stream",
166
- "text": [
167
- "----------------------------------------------------------------\n",
168
- " Layer (type) Output Shape Param #\n",
169
- "================================================================\n",
170
- " Conv2d-1 [-1, 16, 66, 46] 160\n",
171
- " ReLU-2 [-1, 16, 66, 46] 0\n",
172
- " MaxPool2d-3 [-1, 16, 33, 23] 0\n",
173
- " Conv2d-4 [-1, 32, 35, 25] 4,640\n",
174
- " ReLU-5 [-1, 32, 35, 25] 0\n",
175
- " MaxPool2d-6 [-1, 32, 17, 12] 0\n",
176
- " Conv2d-7 [-1, 64, 19, 14] 18,496\n",
177
- " ReLU-8 [-1, 64, 19, 14] 0\n",
178
- " MaxPool2d-9 [-1, 64, 9, 7] 0\n",
179
- " Conv2d-10 [-1, 128, 11, 9] 73,856\n",
180
- " ReLU-11 [-1, 128, 11, 9] 0\n",
181
- " MaxPool2d-12 [-1, 128, 5, 4] 0\n",
182
- " Flatten-13 [-1, 2560] 0\n",
183
- " Linear-14 [-1, 10] 25,610\n",
184
- " Softmax-15 [-1, 10] 0\n",
185
- "================================================================\n",
186
- "Total params: 122,762\n",
187
- "Trainable params: 122,762\n",
188
- "Non-trainable params: 0\n",
189
- "----------------------------------------------------------------\n",
190
- "Input size (MB): 0.01\n",
191
- "Forward/backward pass size (MB): 1.83\n",
192
- "Params size (MB): 0.47\n",
193
- "Estimated Total Size (MB): 2.31\n",
194
- "----------------------------------------------------------------\n"
195
  ]
196
  }
197
  ],
@@ -202,8 +184,8 @@
202
  },
203
  {
204
  "cell_type": "code",
205
- "execution_count": 91,
206
- "id": "d2da6515",
207
  "metadata": {},
208
  "outputs": [
209
  {
@@ -212,7 +194,7 @@
212
  "tensor(0)"
213
  ]
214
  },
215
- "execution_count": 91,
216
  "metadata": {},
217
  "output_type": "execute_result"
218
  }
@@ -223,8 +205,8 @@
223
  },
224
  {
225
  "cell_type": "code",
226
- "execution_count": 95,
227
- "id": "8a10cc8c",
228
  "metadata": {},
229
  "outputs": [
230
  {
@@ -233,7 +215,7 @@
233
  "{'aman': 0, 'imran': 1, 'labib': 2}"
234
  ]
235
  },
236
- "execution_count": 95,
237
  "metadata": {},
238
  "output_type": "execute_result"
239
  }
@@ -244,23 +226,26 @@
244
  },
245
  {
246
  "cell_type": "code",
247
- "execution_count": 98,
248
- "id": "e65a95c3",
249
  "metadata": {},
250
  "outputs": [
251
  {
252
- "ename": "TypeError",
253
- "evalue": "join() argument must be str, bytes, or os.PathLike object, not 'int'",
254
- "output_type": "error",
255
- "traceback": [
256
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
257
- "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
258
- "Cell \u001b[0;32mIn[98], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mdataset\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\n",
259
- "File \u001b[0;32m~/ml-sandbox/VoID/notebooks/../dataset.py:41\u001b[0m, in \u001b[0;36mVoiceDataset.__getitem__\u001b[0;34m(self, index)\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__getitem__\u001b[39m(\u001b[38;5;28mself\u001b[39m, index):\n\u001b[1;32m 39\u001b[0m \u001b[38;5;66;03m# get file\u001b[39;00m\n\u001b[1;32m 40\u001b[0m file, label \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39maudio_files_labels[index]\n\u001b[0;32m---> 41\u001b[0m filepath \u001b[38;5;241m=\u001b[39m \u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mjoin\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_data_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mlabel\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfile\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 43\u001b[0m \u001b[38;5;66;03m# load wav\u001b[39;00m\n\u001b[1;32m 44\u001b[0m wav, sr \u001b[38;5;241m=\u001b[39m torchaudio\u001b[38;5;241m.\u001b[39mload(filepath, normalize\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n",
260
- "File \u001b[0;32m~/anaconda3/envs/void/lib/python3.9/posixpath.py:90\u001b[0m, in \u001b[0;36mjoin\u001b[0;34m(a, *p)\u001b[0m\n\u001b[1;32m 88\u001b[0m path \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m sep \u001b[38;5;241m+\u001b[39m b\n\u001b[1;32m 89\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mTypeError\u001b[39;00m, \u001b[38;5;167;01mAttributeError\u001b[39;00m, \u001b[38;5;167;01mBytesWarning\u001b[39;00m):\n\u001b[0;32m---> 90\u001b[0m \u001b[43mgenericpath\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_check_arg_types\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mjoin\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43ma\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mp\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 91\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m\n\u001b[1;32m 92\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m path\n",
261
- "File \u001b[0;32m~/anaconda3/envs/void/lib/python3.9/genericpath.py:152\u001b[0m, in \u001b[0;36m_check_arg_types\u001b[0;34m(funcname, *args)\u001b[0m\n\u001b[1;32m 150\u001b[0m hasbytes \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m 151\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 152\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mfuncname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m() argument must be str, bytes, or \u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m 153\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mos.PathLike object, not \u001b[39m\u001b[38;5;132;01m{\u001b[39;00ms\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__class__\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 154\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m hasstr \u001b[38;5;129;01mand\u001b[39;00m hasbytes:\n\u001b[1;32m 155\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCan\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt mix strings and bytes in path components\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n",
262
- "\u001b[0;31mTypeError\u001b[0m: join() argument must be str, bytes, or os.PathLike object, not 'int'"
263
- ]
 
 
 
264
  }
265
  ],
266
  "source": [
@@ -269,35 +254,43 @@
269
  },
270
  {
271
  "cell_type": "code",
272
- "execution_count": 104,
273
- "id": "a1357e5b",
 
 
 
 
 
 
 
 
 
 
 
274
  "metadata": {},
275
  "outputs": [
276
  {
277
  "data": {
278
  "text/plain": [
279
- "'2023-05-12 22:28:06.556207'"
280
  ]
281
  },
282
- "execution_count": 104,
283
  "metadata": {},
284
  "output_type": "execute_result"
285
  }
286
  ],
287
  "source": [
288
- "from datetime import datetime\n",
289
- "now = datetime.now()"
290
  ]
291
  },
292
  {
293
  "cell_type": "code",
294
  "execution_count": null,
295
- "id": "190c8d4b",
296
  "metadata": {},
297
  "outputs": [],
298
- "source": [
299
- "now.strftime(\"%Y%m%d-%H%M%S\")"
300
- ]
301
  }
302
  ],
303
  "metadata": {
 
3
  {
4
  "cell_type": "code",
5
  "execution_count": 8,
6
+ "id": "aa1911f5",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
 
14
  {
15
  "cell_type": "code",
16
  "execution_count": 10,
17
+ "id": "67260d6a",
18
  "metadata": {},
19
  "outputs": [],
20
  "source": [
 
25
  {
26
  "cell_type": "code",
27
  "execution_count": 86,
28
+ "id": "45a193b9",
29
  "metadata": {},
30
  "outputs": [],
31
  "source": [
 
38
  {
39
  "cell_type": "code",
40
  "execution_count": 85,
41
+ "id": "4e2c5825",
42
  "metadata": {},
43
  "outputs": [],
44
  "source": [
 
49
  {
50
  "cell_type": "code",
51
  "execution_count": 78,
52
+ "id": "1b14521b",
53
  "metadata": {},
54
  "outputs": [
55
  {
 
70
  },
71
  {
72
  "cell_type": "code",
73
+ "execution_count": 109,
74
+ "id": "d0d6fcd7",
75
  "metadata": {},
76
  "outputs": [],
77
  "source": [
 
86
  },
87
  {
88
  "cell_type": "code",
89
+ "execution_count": 110,
90
+ "id": "e39172ab",
91
  "metadata": {},
92
  "outputs": [
93
  {
94
  "data": {
95
  "text/plain": [
96
+ "5717"
97
  ]
98
  },
99
+ "execution_count": 110,
100
  "metadata": {},
101
  "output_type": "execute_result"
102
  }
 
107
  },
108
  {
109
  "cell_type": "code",
110
+ "execution_count": 111,
111
+ "id": "ef5746b3",
112
  "metadata": {},
113
  "outputs": [
114
  {
 
121
  " [0.5154, 0.3950, 0.4497, ..., 0.4916, 0.4505, 0.7709],\n",
122
  " [0.1919, 0.4804, 0.5144, ..., 0.5931, 0.4466, 0.4706],\n",
123
  " [0.1208, 0.4357, 0.4016, ..., 0.5168, 0.7007, 0.3696]]]),\n",
124
+ " 0)"
125
  ]
126
  },
127
+ "execution_count": 111,
128
  "metadata": {},
129
  "output_type": "execute_result"
130
  }
 
135
  },
136
  {
137
  "cell_type": "code",
138
+ "execution_count": 112,
139
+ "id": "a4f08bd4",
140
  "metadata": {},
141
  "outputs": [
142
  {
 
145
  "torch.Size([1, 64, 157])"
146
  ]
147
  },
148
+ "execution_count": 112,
149
  "metadata": {},
150
  "output_type": "execute_result"
151
  }
 
156
  },
157
  {
158
  "cell_type": "code",
159
+ "execution_count": 113,
160
+ "id": "2b58063c",
161
  "metadata": {},
162
  "outputs": [
163
  {
164
+ "ename": "RuntimeError",
165
+ "evalue": "mat1 and mat2 shapes cannot be multiplied (2x2560 and 7040x10)",
166
+ "output_type": "error",
167
+ "traceback": [
168
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
169
+ "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
170
+ "Cell \u001b[0;32mIn[113], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m cnn \u001b[38;5;241m=\u001b[39m CNNetwork()\n\u001b[0;32m----> 2\u001b[0m \u001b[43msummary\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcnn\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m64\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m44\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n",
171
+ "File \u001b[0;32m~/anaconda3/envs/void/lib/python3.9/site-packages/torchsummary/torchsummary.py:72\u001b[0m, in \u001b[0;36msummary\u001b[0;34m(model, input_size, batch_size, device)\u001b[0m\n\u001b[1;32m 68\u001b[0m model\u001b[38;5;241m.\u001b[39mapply(register_hook)\n\u001b[1;32m 70\u001b[0m \u001b[38;5;66;03m# make a forward pass\u001b[39;00m\n\u001b[1;32m 71\u001b[0m \u001b[38;5;66;03m# print(x.shape)\u001b[39;00m\n\u001b[0;32m---> 72\u001b[0m \u001b[43mmodel\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mx\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 74\u001b[0m \u001b[38;5;66;03m# remove these hooks\u001b[39;00m\n\u001b[1;32m 75\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m h \u001b[38;5;129;01min\u001b[39;00m hooks:\n",
172
+ "File \u001b[0;32m~/anaconda3/envs/void/lib/python3.9/site-packages/torch/nn/modules/module.py:1501\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1496\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1497\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1498\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1499\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1500\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1501\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1502\u001b[0m \u001b[38;5;66;03m# Do not call functions when jit is used\u001b[39;00m\n\u001b[1;32m 1503\u001b[0m full_backward_hooks, non_full_backward_hooks \u001b[38;5;241m=\u001b[39m [], []\n",
173
+ "File \u001b[0;32m~/ml-sandbox/VoID/notebooks/../cnn.py:64\u001b[0m, in \u001b[0;36mCNNetwork.forward\u001b[0;34m(self, input_data)\u001b[0m\n\u001b[1;32m 62\u001b[0m x \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconv4(x)\n\u001b[1;32m 63\u001b[0m x \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mflatten(x)\n\u001b[0;32m---> 64\u001b[0m logits \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlinear\u001b[49m\u001b[43m(\u001b[49m\u001b[43mx\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 65\u001b[0m predictions \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msoftmax(logits)\n\u001b[1;32m 66\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m predictions\n",
174
+ "File \u001b[0;32m~/anaconda3/envs/void/lib/python3.9/site-packages/torch/nn/modules/module.py:1538\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1535\u001b[0m bw_hook \u001b[38;5;241m=\u001b[39m hooks\u001b[38;5;241m.\u001b[39mBackwardHook(\u001b[38;5;28mself\u001b[39m, full_backward_hooks, backward_pre_hooks)\n\u001b[1;32m 1536\u001b[0m args \u001b[38;5;241m=\u001b[39m bw_hook\u001b[38;5;241m.\u001b[39msetup_input_hook(args)\n\u001b[0;32m-> 1538\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1539\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks:\n\u001b[1;32m 1540\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m hook_id, hook \u001b[38;5;129;01min\u001b[39;00m (\n\u001b[1;32m 1541\u001b[0m \u001b[38;5;241m*\u001b[39m_global_forward_hooks\u001b[38;5;241m.\u001b[39mitems(),\n\u001b[1;32m 1542\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks\u001b[38;5;241m.\u001b[39mitems(),\n\u001b[1;32m 1543\u001b[0m ):\n",
175
+ "File \u001b[0;32m~/anaconda3/envs/void/lib/python3.9/site-packages/torch/nn/modules/linear.py:114\u001b[0m, in \u001b[0;36mLinear.forward\u001b[0;34m(self, input)\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mforward\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;28minput\u001b[39m: Tensor) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tensor:\n\u001b[0;32m--> 114\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mF\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlinear\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mweight\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbias\u001b[49m\u001b[43m)\u001b[49m\n",
176
+ "\u001b[0;31mRuntimeError\u001b[0m: mat1 and mat2 shapes cannot be multiplied (2x2560 and 7040x10)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  ]
178
  }
179
  ],
 
184
  },
185
  {
186
  "cell_type": "code",
187
+ "execution_count": 114,
188
+ "id": "70264920",
189
  "metadata": {},
190
  "outputs": [
191
  {
 
194
  "tensor(0)"
195
  ]
196
  },
197
+ "execution_count": 114,
198
  "metadata": {},
199
  "output_type": "execute_result"
200
  }
 
205
  },
206
  {
207
  "cell_type": "code",
208
+ "execution_count": 115,
209
+ "id": "9383e1bb",
210
  "metadata": {},
211
  "outputs": [
212
  {
 
215
  "{'aman': 0, 'imran': 1, 'labib': 2}"
216
  ]
217
  },
218
+ "execution_count": 115,
219
  "metadata": {},
220
  "output_type": "execute_result"
221
  }
 
226
  },
227
  {
228
  "cell_type": "code",
229
+ "execution_count": 116,
230
+ "id": "6d0cb06a",
231
  "metadata": {},
232
  "outputs": [
233
  {
234
+ "data": {
235
+ "text/plain": [
236
+ "(tensor([[[0.2647, 0.0247, 0.0324, ..., 0.0230, 0.1026, 0.5454],\n",
237
+ " [0.0812, 0.0178, 0.0890, ..., 0.2376, 0.5061, 0.5292],\n",
238
+ " [0.0052, 0.0212, 0.1341, ..., 0.9336, 0.2778, 0.1372],\n",
239
+ " ...,\n",
240
+ " [0.5154, 0.3950, 0.4497, ..., 0.4916, 0.4505, 0.7709],\n",
241
+ " [0.1919, 0.4804, 0.5144, ..., 0.5931, 0.4466, 0.4706],\n",
242
+ " [0.1208, 0.4357, 0.4016, ..., 0.5168, 0.7007, 0.3696]]]),\n",
243
+ " 0)"
244
+ ]
245
+ },
246
+ "execution_count": 116,
247
+ "metadata": {},
248
+ "output_type": "execute_result"
249
  }
250
  ],
251
  "source": [
 
254
  },
255
  {
256
  "cell_type": "code",
257
+ "execution_count": 117,
258
+ "id": "e07e35f7",
259
+ "metadata": {},
260
+ "outputs": [],
261
+ "source": [
262
+ "from datetime import datetime\n",
263
+ "now = datetime.now()"
264
+ ]
265
+ },
266
+ {
267
+ "cell_type": "code",
268
+ "execution_count": 107,
269
+ "id": "ef2eddad",
270
  "metadata": {},
271
  "outputs": [
272
  {
273
  "data": {
274
  "text/plain": [
275
+ "'20230512_222912'"
276
  ]
277
  },
278
+ "execution_count": 107,
279
  "metadata": {},
280
  "output_type": "execute_result"
281
  }
282
  ],
283
  "source": [
284
+ "now.strftime(\"%Y%m%d_%H%M%S\")"
 
285
  ]
286
  },
287
  {
288
  "cell_type": "code",
289
  "execution_count": null,
290
+ "id": "c665d0cf",
291
  "metadata": {},
292
  "outputs": [],
293
+ "source": []
 
 
294
  }
295
  ],
296
  "metadata": {