Spaces:
Runtime error
Runtime error
updateupdate
Browse files
__pycache__/dataloading.cpython-310.pyc
CHANGED
Binary files a/__pycache__/dataloading.cpython-310.pyc and b/__pycache__/dataloading.cpython-310.pyc differ
|
|
__pycache__/gradio_utils.cpython-310.pyc
CHANGED
Binary files a/__pycache__/gradio_utils.cpython-310.pyc and b/__pycache__/gradio_utils.cpython-310.pyc differ
|
|
__pycache__/preprocessing.cpython-310.pyc
CHANGED
Binary files a/__pycache__/preprocessing.cpython-310.pyc and b/__pycache__/preprocessing.cpython-310.pyc differ
|
|
__pycache__/resnet.cpython-310.pyc
CHANGED
Binary files a/__pycache__/resnet.cpython-310.pyc and b/__pycache__/resnet.cpython-310.pyc differ
|
|
best_model_gradio.ipynb
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
},
|
10 |
{
|
11 |
"cell_type": "code",
|
12 |
-
"execution_count":
|
13 |
"metadata": {},
|
14 |
"outputs": [
|
15 |
{
|
@@ -60,11 +60,11 @@
|
|
60 |
"\n",
|
61 |
"# Dataloading params\n",
|
62 |
"PATHS: list = [\n",
|
63 |
-
" \"../data/\",\n",
|
64 |
-
" \"../new_data/JulienNestor\",\n",
|
65 |
-
" \"../new_data/classroom_data\",\n",
|
66 |
-
" \"../new_data/class\",\n",
|
67 |
-
" \"../new_data/JulienRaph\",\n",
|
68 |
"]\n",
|
69 |
"REMOVE_LABEL: list = [\n",
|
70 |
" \"penduleinverse\", \"pendule\", \n",
|
@@ -243,112 +243,112 @@
|
|
243 |
"text": [
|
244 |
" epoch train_loss dur\n",
|
245 |
"------- ------------ ------\n",
|
246 |
-
" 1 \u001b[36m2.
|
247 |
-
" 2 \u001b[36m1.
|
248 |
-
" 3 \u001b[36m1.
|
249 |
-
" 4 \u001b[36m1.
|
250 |
-
" 5 \u001b[36m1.
|
251 |
-
" 6 \u001b[36m1.
|
252 |
-
" 7 \u001b[36m1.
|
253 |
-
" 8 1.
|
254 |
-
" 9 \u001b[36m1.
|
255 |
-
" 10 \u001b[
|
256 |
-
" 11 \u001b[
|
257 |
-
" 12 \u001b[36m0.
|
258 |
-
" 13 \u001b[36m0.
|
259 |
-
" 14 \u001b[36m0.
|
260 |
-
" 15 \u001b[36m0.
|
261 |
-
" 16 \u001b[36m0.
|
262 |
-
" 17 \u001b[36m0.
|
263 |
-
" 18 \u001b[36m0.
|
264 |
-
" 19 0.
|
265 |
-
" 20 \u001b[36m0.
|
266 |
-
" 21 \u001b[36m0.
|
267 |
-
" 22 0.
|
268 |
-
" 23 0.
|
269 |
-
" 24 \u001b[36m0.
|
270 |
-
" 25 \u001b[36m0.
|
271 |
-
" 26 \u001b[36m0.
|
272 |
-
" 27 \u001b[36m0.
|
273 |
-
" 28 \u001b[36m0.
|
274 |
-
" 29 0.
|
275 |
-
" 30 0.
|
276 |
-
" 31 0.
|
277 |
-
" 32 \u001b[36m0.
|
278 |
-
" 33 0.
|
279 |
-
" 34 \u001b[36m0.
|
280 |
-
" 35 \u001b[36m0.
|
281 |
-
" 36 0.
|
282 |
-
" 37 0.
|
283 |
-
" 38 0.
|
284 |
-
" 39 \u001b[36m0.
|
285 |
-
" 40 0.
|
286 |
-
" 41 0.
|
287 |
-
" 42 0.
|
288 |
-
" 43 0.
|
289 |
-
" 44 0.
|
290 |
-
" 45 \u001b[36m0.
|
291 |
-
" 46 0.
|
292 |
-
" 47 0.
|
293 |
-
" 48 0.
|
294 |
-
" 49 0.
|
295 |
-
" 50 0.
|
296 |
-
" 51 0.
|
297 |
-
" 52 0.
|
298 |
-
" 53 \u001b[36m0.
|
299 |
-
" 54 0.
|
300 |
-
" 55 0.
|
301 |
-
" 56 0.
|
302 |
-
" 57 0.
|
303 |
-
" 58 \u001b[36m0.
|
304 |
-
" 59 0.
|
305 |
-
" 60 0.
|
306 |
-
" 61 0.
|
307 |
-
" 62 0.2412 0.
|
308 |
-
" 63 0.
|
309 |
-
" 64 0.
|
310 |
-
" 65 0.
|
311 |
-
" 66 0.
|
312 |
-
" 67 0.
|
313 |
-
" 68 0.
|
314 |
-
" 69 0.
|
315 |
-
" 70 \u001b[36m0.
|
316 |
-
" 71 0.
|
317 |
-
" 72 0.
|
318 |
-
" 73 0.
|
319 |
-
" 74 \u001b[36m0.
|
320 |
-
" 75 0.
|
321 |
-
" 76 0.
|
322 |
-
" 77 0.
|
323 |
-
" 78 0.
|
324 |
-
" 79 0.
|
325 |
-
" 80 \u001b[36m0.
|
326 |
-
" 81 0.
|
327 |
-
" 82 0.
|
328 |
-
" 83 0.
|
329 |
-
" 84 0.
|
330 |
-
" 85 0.
|
331 |
-
" 86 0.
|
332 |
-
" 87 0.2479 0.
|
333 |
-
" 88 0.
|
334 |
-
" 89 0.
|
335 |
-
" 90 0.2167 0.
|
336 |
-
" 91 0.
|
337 |
-
" 92 0.
|
338 |
-
" 93 0.
|
339 |
-
" 94 0.
|
340 |
-
" 95 0.2437 0.
|
341 |
-
" 96 0.
|
342 |
-
" 97 0.
|
343 |
-
" 98 0.
|
344 |
-
" 99 0.
|
345 |
-
" 100 0.
|
346 |
-
" 101 0.
|
347 |
-
" 102 0.2231 0.
|
348 |
-
" 103 0.
|
349 |
-
" 104 0.
|
350 |
"Stopping since train_loss has not improved in the last 25 epochs.\n",
|
351 |
-
"0.
|
352 |
]
|
353 |
}
|
354 |
],
|
@@ -383,7 +383,121 @@
|
|
383 |
{
|
384 |
"data": {
|
385 |
"text/plain": [
|
386 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
]
|
388 |
},
|
389 |
"execution_count": 39,
|
@@ -391,6 +505,27 @@
|
|
391 |
"output_type": "execute_result"
|
392 |
}
|
393 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
"source": [
|
395 |
"from joblib import dump, load\n",
|
396 |
"\n",
|
@@ -406,7 +541,7 @@
|
|
406 |
},
|
407 |
{
|
408 |
"cell_type": "code",
|
409 |
-
"execution_count":
|
410 |
"metadata": {},
|
411 |
"outputs": [],
|
412 |
"source": [
|
@@ -433,16 +568,7 @@
|
|
433 |
"cell_type": "code",
|
434 |
"execution_count": 43,
|
435 |
"metadata": {},
|
436 |
-
"outputs": [
|
437 |
-
{
|
438 |
-
"ename": "",
|
439 |
-
"evalue": "",
|
440 |
-
"output_type": "error",
|
441 |
-
"traceback": [
|
442 |
-
"\u001b[1;31mThe Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. View Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
|
443 |
-
]
|
444 |
-
}
|
445 |
-
],
|
446 |
"source": [
|
447 |
"title = r\"ResNet 9\"\n",
|
448 |
"\n",
|
@@ -473,6 +599,13 @@
|
|
473 |
" # flagging_dir = \"./flag/men\"\n",
|
474 |
")"
|
475 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
}
|
477 |
],
|
478 |
"metadata": {
|
|
|
9 |
},
|
10 |
{
|
11 |
"cell_type": "code",
|
12 |
+
"execution_count": 26,
|
13 |
"metadata": {},
|
14 |
"outputs": [
|
15 |
{
|
|
|
60 |
"\n",
|
61 |
"# Dataloading params\n",
|
62 |
"PATHS: list = [\n",
|
63 |
+
" \"../Projet-ML/data/\",\n",
|
64 |
+
" \"../Projet-ML/new_data/JulienNestor\",\n",
|
65 |
+
" \"../Projet-ML/new_data/classroom_data\",\n",
|
66 |
+
" \"../Projet-ML/new_data/class\",\n",
|
67 |
+
" \"../Projet-ML/new_data/JulienRaph\",\n",
|
68 |
"]\n",
|
69 |
"REMOVE_LABEL: list = [\n",
|
70 |
" \"penduleinverse\", \"pendule\", \n",
|
|
|
243 |
"text": [
|
244 |
" epoch train_loss dur\n",
|
245 |
"------- ------------ ------\n",
|
246 |
+
" 1 \u001b[36m2.8636\u001b[0m 1.9894\n",
|
247 |
+
" 2 \u001b[36m1.9484\u001b[0m 0.4326\n",
|
248 |
+
" 3 \u001b[36m1.8183\u001b[0m 0.4312\n",
|
249 |
+
" 4 \u001b[36m1.6839\u001b[0m 0.4318\n",
|
250 |
+
" 5 \u001b[36m1.5514\u001b[0m 0.4326\n",
|
251 |
+
" 6 \u001b[36m1.4672\u001b[0m 0.4309\n",
|
252 |
+
" 7 \u001b[36m1.2708\u001b[0m 0.4323\n",
|
253 |
+
" 8 1.2842 0.4308\n",
|
254 |
+
" 9 \u001b[36m1.0673\u001b[0m 0.4316\n",
|
255 |
+
" 10 \u001b[36m0.9857\u001b[0m 0.4307\n",
|
256 |
+
" 11 \u001b[36m0.9400\u001b[0m 0.4322\n",
|
257 |
+
" 12 \u001b[36m0.9096\u001b[0m 0.4310\n",
|
258 |
+
" 13 \u001b[36m0.7838\u001b[0m 0.4313\n",
|
259 |
+
" 14 \u001b[36m0.7031\u001b[0m 0.4330\n",
|
260 |
+
" 15 \u001b[36m0.6361\u001b[0m 0.4313\n",
|
261 |
+
" 16 \u001b[36m0.5983\u001b[0m 0.4325\n",
|
262 |
+
" 17 \u001b[36m0.5712\u001b[0m 0.4318\n",
|
263 |
+
" 18 \u001b[36m0.4825\u001b[0m 0.4315\n",
|
264 |
+
" 19 0.4951 0.4323\n",
|
265 |
+
" 20 \u001b[36m0.4653\u001b[0m 0.4320\n",
|
266 |
+
" 21 \u001b[36m0.4050\u001b[0m 0.4333\n",
|
267 |
+
" 22 0.4351 0.4317\n",
|
268 |
+
" 23 0.4365 0.4314\n",
|
269 |
+
" 24 \u001b[36m0.4000\u001b[0m 0.4304\n",
|
270 |
+
" 25 \u001b[36m0.3876\u001b[0m 0.4319\n",
|
271 |
+
" 26 \u001b[36m0.3740\u001b[0m 0.4327\n",
|
272 |
+
" 27 \u001b[36m0.3589\u001b[0m 0.4323\n",
|
273 |
+
" 28 \u001b[36m0.3173\u001b[0m 0.4330\n",
|
274 |
+
" 29 0.3412 0.4322\n",
|
275 |
+
" 30 0.3263 0.4335\n",
|
276 |
+
" 31 0.3313 0.4322\n",
|
277 |
+
" 32 \u001b[36m0.3033\u001b[0m 0.4327\n",
|
278 |
+
" 33 0.3333 0.4325\n",
|
279 |
+
" 34 \u001b[36m0.2912\u001b[0m 0.4328\n",
|
280 |
+
" 35 \u001b[36m0.2834\u001b[0m 0.4330\n",
|
281 |
+
" 36 0.3150 0.4326\n",
|
282 |
+
" 37 0.2842 0.4339\n",
|
283 |
+
" 38 0.2854 0.4335\n",
|
284 |
+
" 39 \u001b[36m0.2588\u001b[0m 0.4341\n",
|
285 |
+
" 40 0.2775 0.4340\n",
|
286 |
+
" 41 0.2823 0.4336\n",
|
287 |
+
" 42 0.2826 0.4344\n",
|
288 |
+
" 43 0.2723 0.4328\n",
|
289 |
+
" 44 0.2638 0.4354\n",
|
290 |
+
" 45 \u001b[36m0.2350\u001b[0m 0.4348\n",
|
291 |
+
" 46 0.2463 0.4334\n",
|
292 |
+
" 47 0.2688 0.4333\n",
|
293 |
+
" 48 0.2652 0.4343\n",
|
294 |
+
" 49 0.2869 0.4348\n",
|
295 |
+
" 50 0.2833 0.4338\n",
|
296 |
+
" 51 0.2541 0.4335\n",
|
297 |
+
" 52 0.2796 0.4318\n",
|
298 |
+
" 53 \u001b[36m0.2273\u001b[0m 0.4350\n",
|
299 |
+
" 54 0.2516 0.4341\n",
|
300 |
+
" 55 0.2392 0.4332\n",
|
301 |
+
" 56 0.2480 0.4332\n",
|
302 |
+
" 57 0.2341 0.4331\n",
|
303 |
+
" 58 \u001b[36m0.2240\u001b[0m 0.4332\n",
|
304 |
+
" 59 0.2441 0.4333\n",
|
305 |
+
" 60 0.2313 0.4329\n",
|
306 |
+
" 61 0.2590 0.4348\n",
|
307 |
+
" 62 0.2412 0.4344\n",
|
308 |
+
" 63 0.2391 0.4323\n",
|
309 |
+
" 64 0.2591 0.4331\n",
|
310 |
+
" 65 0.2595 0.4336\n",
|
311 |
+
" 66 0.2356 0.4328\n",
|
312 |
+
" 67 0.2529 0.4351\n",
|
313 |
+
" 68 0.2262 0.4330\n",
|
314 |
+
" 69 0.2438 0.4322\n",
|
315 |
+
" 70 \u001b[36m0.2189\u001b[0m 0.4323\n",
|
316 |
+
" 71 0.2283 0.4318\n",
|
317 |
+
" 72 0.2333 0.4325\n",
|
318 |
+
" 73 0.2327 0.4333\n",
|
319 |
+
" 74 \u001b[36m0.2062\u001b[0m 0.4350\n",
|
320 |
+
" 75 0.2566 0.4323\n",
|
321 |
+
" 76 0.2373 0.4333\n",
|
322 |
+
" 77 0.2253 0.4332\n",
|
323 |
+
" 78 0.2446 0.4328\n",
|
324 |
+
" 79 0.2459 0.4328\n",
|
325 |
+
" 80 \u001b[36m0.2006\u001b[0m 0.4322\n",
|
326 |
+
" 81 0.2170 0.4337\n",
|
327 |
+
" 82 0.2270 0.4324\n",
|
328 |
+
" 83 0.2177 0.4324\n",
|
329 |
+
" 84 0.2235 0.4318\n",
|
330 |
+
" 85 0.2326 0.4341\n",
|
331 |
+
" 86 0.2260 0.4330\n",
|
332 |
+
" 87 0.2479 0.4318\n",
|
333 |
+
" 88 0.2267 0.4335\n",
|
334 |
+
" 89 0.2544 0.4324\n",
|
335 |
+
" 90 0.2167 0.4347\n",
|
336 |
+
" 91 0.2280 0.4328\n",
|
337 |
+
" 92 0.2093 0.4334\n",
|
338 |
+
" 93 0.2035 0.4337\n",
|
339 |
+
" 94 0.2077 0.4327\n",
|
340 |
+
" 95 0.2437 0.4341\n",
|
341 |
+
" 96 0.2278 0.4330\n",
|
342 |
+
" 97 0.2265 0.4359\n",
|
343 |
+
" 98 0.2145 0.4328\n",
|
344 |
+
" 99 0.2239 0.4336\n",
|
345 |
+
" 100 0.2034 0.4333\n",
|
346 |
+
" 101 0.2286 0.4332\n",
|
347 |
+
" 102 0.2231 0.4325\n",
|
348 |
+
" 103 0.2169 0.4327\n",
|
349 |
+
" 104 0.2415 0.4337\n",
|
350 |
"Stopping since train_loss has not improved in the last 25 epochs.\n",
|
351 |
+
"0.946058091286307\n"
|
352 |
]
|
353 |
}
|
354 |
],
|
|
|
383 |
{
|
384 |
"data": {
|
385 |
"text/plain": [
|
386 |
+
"ResNet(\n",
|
387 |
+
" (conv1): ConvBlock(\n",
|
388 |
+
" (pool_block): Sequential(\n",
|
389 |
+
" (0): ReLU(inplace=True)\n",
|
390 |
+
" )\n",
|
391 |
+
" (block): Sequential(\n",
|
392 |
+
" (0): Conv2d(1, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
393 |
+
" (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
394 |
+
" (2): Sequential(\n",
|
395 |
+
" (0): ReLU(inplace=True)\n",
|
396 |
+
" )\n",
|
397 |
+
" )\n",
|
398 |
+
" )\n",
|
399 |
+
" (conv2): ConvBlock(\n",
|
400 |
+
" (pool_block): Sequential(\n",
|
401 |
+
" (0): ReLU(inplace=True)\n",
|
402 |
+
" (1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
|
403 |
+
" )\n",
|
404 |
+
" (block): Sequential(\n",
|
405 |
+
" (0): Conv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
406 |
+
" (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
407 |
+
" (2): Sequential(\n",
|
408 |
+
" (0): ReLU(inplace=True)\n",
|
409 |
+
" (1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
|
410 |
+
" )\n",
|
411 |
+
" )\n",
|
412 |
+
" )\n",
|
413 |
+
" (res1): Sequential(\n",
|
414 |
+
" (0): ConvBlock(\n",
|
415 |
+
" (pool_block): Sequential(\n",
|
416 |
+
" (0): ReLU(inplace=True)\n",
|
417 |
+
" )\n",
|
418 |
+
" (block): Sequential(\n",
|
419 |
+
" (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
420 |
+
" (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
421 |
+
" (2): Sequential(\n",
|
422 |
+
" (0): ReLU(inplace=True)\n",
|
423 |
+
" )\n",
|
424 |
+
" )\n",
|
425 |
+
" )\n",
|
426 |
+
" (1): ConvBlock(\n",
|
427 |
+
" (pool_block): Sequential(\n",
|
428 |
+
" (0): ReLU(inplace=True)\n",
|
429 |
+
" )\n",
|
430 |
+
" (block): Sequential(\n",
|
431 |
+
" (0): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
432 |
+
" (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
433 |
+
" (2): Sequential(\n",
|
434 |
+
" (0): ReLU(inplace=True)\n",
|
435 |
+
" )\n",
|
436 |
+
" )\n",
|
437 |
+
" )\n",
|
438 |
+
" )\n",
|
439 |
+
" (conv3): ConvBlock(\n",
|
440 |
+
" (pool_block): Sequential(\n",
|
441 |
+
" (0): ReLU(inplace=True)\n",
|
442 |
+
" )\n",
|
443 |
+
" (block): Sequential(\n",
|
444 |
+
" (0): Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
445 |
+
" (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
446 |
+
" (2): Sequential(\n",
|
447 |
+
" (0): ReLU(inplace=True)\n",
|
448 |
+
" )\n",
|
449 |
+
" )\n",
|
450 |
+
" )\n",
|
451 |
+
" (conv4): ConvBlock(\n",
|
452 |
+
" (pool_block): Sequential(\n",
|
453 |
+
" (0): ReLU(inplace=True)\n",
|
454 |
+
" (1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
|
455 |
+
" )\n",
|
456 |
+
" (block): Sequential(\n",
|
457 |
+
" (0): Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
458 |
+
" (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
459 |
+
" (2): Sequential(\n",
|
460 |
+
" (0): ReLU(inplace=True)\n",
|
461 |
+
" (1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
|
462 |
+
" )\n",
|
463 |
+
" )\n",
|
464 |
+
" )\n",
|
465 |
+
" (res2): Sequential(\n",
|
466 |
+
" (0): ConvBlock(\n",
|
467 |
+
" (pool_block): Sequential(\n",
|
468 |
+
" (0): ReLU(inplace=True)\n",
|
469 |
+
" )\n",
|
470 |
+
" (block): Sequential(\n",
|
471 |
+
" (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
472 |
+
" (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
473 |
+
" (2): Sequential(\n",
|
474 |
+
" (0): ReLU(inplace=True)\n",
|
475 |
+
" )\n",
|
476 |
+
" )\n",
|
477 |
+
" )\n",
|
478 |
+
" (1): ConvBlock(\n",
|
479 |
+
" (pool_block): Sequential(\n",
|
480 |
+
" (0): ReLU(inplace=True)\n",
|
481 |
+
" )\n",
|
482 |
+
" (block): Sequential(\n",
|
483 |
+
" (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
|
484 |
+
" (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
|
485 |
+
" (2): Sequential(\n",
|
486 |
+
" (0): ReLU(inplace=True)\n",
|
487 |
+
" )\n",
|
488 |
+
" )\n",
|
489 |
+
" )\n",
|
490 |
+
" )\n",
|
491 |
+
" (classifier): Sequential(\n",
|
492 |
+
" (0): MaxPool2d(kernel_size=(4, 4), stride=(4, 4), padding=0, dilation=1, ceil_mode=False)\n",
|
493 |
+
" (1): AdaptiveAvgPool2d(output_size=1)\n",
|
494 |
+
" (2): Flatten(start_dim=1, end_dim=-1)\n",
|
495 |
+
" (3): Linear(in_features=512, out_features=128, bias=True)\n",
|
496 |
+
" (4): Dropout(p=0.25, inplace=False)\n",
|
497 |
+
" (5): Linear(in_features=128, out_features=7, bias=True)\n",
|
498 |
+
" (6): Dropout(p=0.25, inplace=False)\n",
|
499 |
+
" )\n",
|
500 |
+
")"
|
501 |
]
|
502 |
},
|
503 |
"execution_count": 39,
|
|
|
505 |
"output_type": "execute_result"
|
506 |
}
|
507 |
],
|
508 |
+
"source": [
|
509 |
+
"model.device = torch.device(\"cpu\")\n",
|
510 |
+
"model.module.to(torch.device(\"cpu\"))"
|
511 |
+
]
|
512 |
+
},
|
513 |
+
{
|
514 |
+
"cell_type": "code",
|
515 |
+
"execution_count": 41,
|
516 |
+
"metadata": {},
|
517 |
+
"outputs": [
|
518 |
+
{
|
519 |
+
"data": {
|
520 |
+
"text/plain": [
|
521 |
+
"['./model/HOP_LENGHT.joblib']"
|
522 |
+
]
|
523 |
+
},
|
524 |
+
"execution_count": 41,
|
525 |
+
"metadata": {},
|
526 |
+
"output_type": "execute_result"
|
527 |
+
}
|
528 |
+
],
|
529 |
"source": [
|
530 |
"from joblib import dump, load\n",
|
531 |
"\n",
|
|
|
541 |
},
|
542 |
{
|
543 |
"cell_type": "code",
|
544 |
+
"execution_count": 42,
|
545 |
"metadata": {},
|
546 |
"outputs": [],
|
547 |
"source": [
|
|
|
568 |
"cell_type": "code",
|
569 |
"execution_count": 43,
|
570 |
"metadata": {},
|
571 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
"source": [
|
573 |
"title = r\"ResNet 9\"\n",
|
574 |
"\n",
|
|
|
599 |
" # flagging_dir = \"./flag/men\"\n",
|
600 |
")"
|
601 |
]
|
602 |
+
},
|
603 |
+
{
|
604 |
+
"cell_type": "code",
|
605 |
+
"execution_count": null,
|
606 |
+
"metadata": {},
|
607 |
+
"outputs": [],
|
608 |
+
"source": []
|
609 |
}
|
610 |
],
|
611 |
"metadata": {
|
model/model.joblib
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c2389a5deeaf1ee5e83c187d772dd2cba6c827f055a263ccdae392f833c3a987
|
3 |
+
size 53218172
|