CSSJowoo commited on
Commit
b3e30ad
·
verified ·
1 Parent(s): d0cda02

Upload sampleRun_v2.ipynb

Browse files
Files changed (1) hide show
  1. sampleRun_v2.ipynb +1090 -0
sampleRun_v2.ipynb ADDED
@@ -0,0 +1,1090 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "gpuType": "T4"
8
+ },
9
+ "kernelspec": {
10
+ "name": "python3",
11
+ "display_name": "Python 3"
12
+ },
13
+ "language_info": {
14
+ "name": "python"
15
+ },
16
+ "accelerator": "GPU",
17
+ "widgets": {
18
+ "application/vnd.jupyter.widget-state+json": {
19
+ "712ce69edaac4f628fd9dfd76b53eac4": {
20
+ "model_module": "@jupyter-widgets/controls",
21
+ "model_name": "HBoxModel",
22
+ "model_module_version": "1.5.0",
23
+ "state": {
24
+ "_dom_classes": [],
25
+ "_model_module": "@jupyter-widgets/controls",
26
+ "_model_module_version": "1.5.0",
27
+ "_model_name": "HBoxModel",
28
+ "_view_count": null,
29
+ "_view_module": "@jupyter-widgets/controls",
30
+ "_view_module_version": "1.5.0",
31
+ "_view_name": "HBoxView",
32
+ "box_style": "",
33
+ "children": [
34
+ "IPY_MODEL_36c6e1df7117444ebd530aec4bb0dacb",
35
+ "IPY_MODEL_5bce52370cd641d5a9bd5cc1459b5a7b",
36
+ "IPY_MODEL_082b691403a34f15bbe062d8f4d21c17"
37
+ ],
38
+ "layout": "IPY_MODEL_2320ec3596e546709f8c9ee73ce07548"
39
+ }
40
+ },
41
+ "36c6e1df7117444ebd530aec4bb0dacb": {
42
+ "model_module": "@jupyter-widgets/controls",
43
+ "model_name": "HTMLModel",
44
+ "model_module_version": "1.5.0",
45
+ "state": {
46
+ "_dom_classes": [],
47
+ "_model_module": "@jupyter-widgets/controls",
48
+ "_model_module_version": "1.5.0",
49
+ "_model_name": "HTMLModel",
50
+ "_view_count": null,
51
+ "_view_module": "@jupyter-widgets/controls",
52
+ "_view_module_version": "1.5.0",
53
+ "_view_name": "HTMLView",
54
+ "description": "",
55
+ "description_tooltip": null,
56
+ "layout": "IPY_MODEL_c7e2d4daa56a48d79869bf0fadb7a34d",
57
+ "placeholder": "​",
58
+ "style": "IPY_MODEL_c011b5895afb48729adeb0be47cc08f4",
59
+ "value": "efficientnet_gps_regressor_complete.pth: 100%"
60
+ }
61
+ },
62
+ "5bce52370cd641d5a9bd5cc1459b5a7b": {
63
+ "model_module": "@jupyter-widgets/controls",
64
+ "model_name": "FloatProgressModel",
65
+ "model_module_version": "1.5.0",
66
+ "state": {
67
+ "_dom_classes": [],
68
+ "_model_module": "@jupyter-widgets/controls",
69
+ "_model_module_version": "1.5.0",
70
+ "_model_name": "FloatProgressModel",
71
+ "_view_count": null,
72
+ "_view_module": "@jupyter-widgets/controls",
73
+ "_view_module_version": "1.5.0",
74
+ "_view_name": "ProgressView",
75
+ "bar_style": "success",
76
+ "description": "",
77
+ "description_tooltip": null,
78
+ "layout": "IPY_MODEL_ac49064e71784748b40ab9b44658426f",
79
+ "max": 16408050,
80
+ "min": 0,
81
+ "orientation": "horizontal",
82
+ "style": "IPY_MODEL_1dbbb0a6dba643dd83f5bfaad552dcd7",
83
+ "value": 16408050
84
+ }
85
+ },
86
+ "082b691403a34f15bbe062d8f4d21c17": {
87
+ "model_module": "@jupyter-widgets/controls",
88
+ "model_name": "HTMLModel",
89
+ "model_module_version": "1.5.0",
90
+ "state": {
91
+ "_dom_classes": [],
92
+ "_model_module": "@jupyter-widgets/controls",
93
+ "_model_module_version": "1.5.0",
94
+ "_model_name": "HTMLModel",
95
+ "_view_count": null,
96
+ "_view_module": "@jupyter-widgets/controls",
97
+ "_view_module_version": "1.5.0",
98
+ "_view_name": "HTMLView",
99
+ "description": "",
100
+ "description_tooltip": null,
101
+ "layout": "IPY_MODEL_16b552f5d27741fbb8f8a284039b05b2",
102
+ "placeholder": "​",
103
+ "style": "IPY_MODEL_78c682f5754b4a35b5461cc59cb0c218",
104
+ "value": " 16.4M/16.4M [00:00<00:00, 30.0MB/s]"
105
+ }
106
+ },
107
+ "2320ec3596e546709f8c9ee73ce07548": {
108
+ "model_module": "@jupyter-widgets/base",
109
+ "model_name": "LayoutModel",
110
+ "model_module_version": "1.2.0",
111
+ "state": {
112
+ "_model_module": "@jupyter-widgets/base",
113
+ "_model_module_version": "1.2.0",
114
+ "_model_name": "LayoutModel",
115
+ "_view_count": null,
116
+ "_view_module": "@jupyter-widgets/base",
117
+ "_view_module_version": "1.2.0",
118
+ "_view_name": "LayoutView",
119
+ "align_content": null,
120
+ "align_items": null,
121
+ "align_self": null,
122
+ "border": null,
123
+ "bottom": null,
124
+ "display": null,
125
+ "flex": null,
126
+ "flex_flow": null,
127
+ "grid_area": null,
128
+ "grid_auto_columns": null,
129
+ "grid_auto_flow": null,
130
+ "grid_auto_rows": null,
131
+ "grid_column": null,
132
+ "grid_gap": null,
133
+ "grid_row": null,
134
+ "grid_template_areas": null,
135
+ "grid_template_columns": null,
136
+ "grid_template_rows": null,
137
+ "height": null,
138
+ "justify_content": null,
139
+ "justify_items": null,
140
+ "left": null,
141
+ "margin": null,
142
+ "max_height": null,
143
+ "max_width": null,
144
+ "min_height": null,
145
+ "min_width": null,
146
+ "object_fit": null,
147
+ "object_position": null,
148
+ "order": null,
149
+ "overflow": null,
150
+ "overflow_x": null,
151
+ "overflow_y": null,
152
+ "padding": null,
153
+ "right": null,
154
+ "top": null,
155
+ "visibility": null,
156
+ "width": null
157
+ }
158
+ },
159
+ "c7e2d4daa56a48d79869bf0fadb7a34d": {
160
+ "model_module": "@jupyter-widgets/base",
161
+ "model_name": "LayoutModel",
162
+ "model_module_version": "1.2.0",
163
+ "state": {
164
+ "_model_module": "@jupyter-widgets/base",
165
+ "_model_module_version": "1.2.0",
166
+ "_model_name": "LayoutModel",
167
+ "_view_count": null,
168
+ "_view_module": "@jupyter-widgets/base",
169
+ "_view_module_version": "1.2.0",
170
+ "_view_name": "LayoutView",
171
+ "align_content": null,
172
+ "align_items": null,
173
+ "align_self": null,
174
+ "border": null,
175
+ "bottom": null,
176
+ "display": null,
177
+ "flex": null,
178
+ "flex_flow": null,
179
+ "grid_area": null,
180
+ "grid_auto_columns": null,
181
+ "grid_auto_flow": null,
182
+ "grid_auto_rows": null,
183
+ "grid_column": null,
184
+ "grid_gap": null,
185
+ "grid_row": null,
186
+ "grid_template_areas": null,
187
+ "grid_template_columns": null,
188
+ "grid_template_rows": null,
189
+ "height": null,
190
+ "justify_content": null,
191
+ "justify_items": null,
192
+ "left": null,
193
+ "margin": null,
194
+ "max_height": null,
195
+ "max_width": null,
196
+ "min_height": null,
197
+ "min_width": null,
198
+ "object_fit": null,
199
+ "object_position": null,
200
+ "order": null,
201
+ "overflow": null,
202
+ "overflow_x": null,
203
+ "overflow_y": null,
204
+ "padding": null,
205
+ "right": null,
206
+ "top": null,
207
+ "visibility": null,
208
+ "width": null
209
+ }
210
+ },
211
+ "c011b5895afb48729adeb0be47cc08f4": {
212
+ "model_module": "@jupyter-widgets/controls",
213
+ "model_name": "DescriptionStyleModel",
214
+ "model_module_version": "1.5.0",
215
+ "state": {
216
+ "_model_module": "@jupyter-widgets/controls",
217
+ "_model_module_version": "1.5.0",
218
+ "_model_name": "DescriptionStyleModel",
219
+ "_view_count": null,
220
+ "_view_module": "@jupyter-widgets/base",
221
+ "_view_module_version": "1.2.0",
222
+ "_view_name": "StyleView",
223
+ "description_width": ""
224
+ }
225
+ },
226
+ "ac49064e71784748b40ab9b44658426f": {
227
+ "model_module": "@jupyter-widgets/base",
228
+ "model_name": "LayoutModel",
229
+ "model_module_version": "1.2.0",
230
+ "state": {
231
+ "_model_module": "@jupyter-widgets/base",
232
+ "_model_module_version": "1.2.0",
233
+ "_model_name": "LayoutModel",
234
+ "_view_count": null,
235
+ "_view_module": "@jupyter-widgets/base",
236
+ "_view_module_version": "1.2.0",
237
+ "_view_name": "LayoutView",
238
+ "align_content": null,
239
+ "align_items": null,
240
+ "align_self": null,
241
+ "border": null,
242
+ "bottom": null,
243
+ "display": null,
244
+ "flex": null,
245
+ "flex_flow": null,
246
+ "grid_area": null,
247
+ "grid_auto_columns": null,
248
+ "grid_auto_flow": null,
249
+ "grid_auto_rows": null,
250
+ "grid_column": null,
251
+ "grid_gap": null,
252
+ "grid_row": null,
253
+ "grid_template_areas": null,
254
+ "grid_template_columns": null,
255
+ "grid_template_rows": null,
256
+ "height": null,
257
+ "justify_content": null,
258
+ "justify_items": null,
259
+ "left": null,
260
+ "margin": null,
261
+ "max_height": null,
262
+ "max_width": null,
263
+ "min_height": null,
264
+ "min_width": null,
265
+ "object_fit": null,
266
+ "object_position": null,
267
+ "order": null,
268
+ "overflow": null,
269
+ "overflow_x": null,
270
+ "overflow_y": null,
271
+ "padding": null,
272
+ "right": null,
273
+ "top": null,
274
+ "visibility": null,
275
+ "width": null
276
+ }
277
+ },
278
+ "1dbbb0a6dba643dd83f5bfaad552dcd7": {
279
+ "model_module": "@jupyter-widgets/controls",
280
+ "model_name": "ProgressStyleModel",
281
+ "model_module_version": "1.5.0",
282
+ "state": {
283
+ "_model_module": "@jupyter-widgets/controls",
284
+ "_model_module_version": "1.5.0",
285
+ "_model_name": "ProgressStyleModel",
286
+ "_view_count": null,
287
+ "_view_module": "@jupyter-widgets/base",
288
+ "_view_module_version": "1.2.0",
289
+ "_view_name": "StyleView",
290
+ "bar_color": null,
291
+ "description_width": ""
292
+ }
293
+ },
294
+ "16b552f5d27741fbb8f8a284039b05b2": {
295
+ "model_module": "@jupyter-widgets/base",
296
+ "model_name": "LayoutModel",
297
+ "model_module_version": "1.2.0",
298
+ "state": {
299
+ "_model_module": "@jupyter-widgets/base",
300
+ "_model_module_version": "1.2.0",
301
+ "_model_name": "LayoutModel",
302
+ "_view_count": null,
303
+ "_view_module": "@jupyter-widgets/base",
304
+ "_view_module_version": "1.2.0",
305
+ "_view_name": "LayoutView",
306
+ "align_content": null,
307
+ "align_items": null,
308
+ "align_self": null,
309
+ "border": null,
310
+ "bottom": null,
311
+ "display": null,
312
+ "flex": null,
313
+ "flex_flow": null,
314
+ "grid_area": null,
315
+ "grid_auto_columns": null,
316
+ "grid_auto_flow": null,
317
+ "grid_auto_rows": null,
318
+ "grid_column": null,
319
+ "grid_gap": null,
320
+ "grid_row": null,
321
+ "grid_template_areas": null,
322
+ "grid_template_columns": null,
323
+ "grid_template_rows": null,
324
+ "height": null,
325
+ "justify_content": null,
326
+ "justify_items": null,
327
+ "left": null,
328
+ "margin": null,
329
+ "max_height": null,
330
+ "max_width": null,
331
+ "min_height": null,
332
+ "min_width": null,
333
+ "object_fit": null,
334
+ "object_position": null,
335
+ "order": null,
336
+ "overflow": null,
337
+ "overflow_x": null,
338
+ "overflow_y": null,
339
+ "padding": null,
340
+ "right": null,
341
+ "top": null,
342
+ "visibility": null,
343
+ "width": null
344
+ }
345
+ },
346
+ "78c682f5754b4a35b5461cc59cb0c218": {
347
+ "model_module": "@jupyter-widgets/controls",
348
+ "model_name": "DescriptionStyleModel",
349
+ "model_module_version": "1.5.0",
350
+ "state": {
351
+ "_model_module": "@jupyter-widgets/controls",
352
+ "_model_module_version": "1.5.0",
353
+ "_model_name": "DescriptionStyleModel",
354
+ "_view_count": null,
355
+ "_view_module": "@jupyter-widgets/base",
356
+ "_view_module_version": "1.2.0",
357
+ "_view_name": "StyleView",
358
+ "description_width": ""
359
+ }
360
+ }
361
+ }
362
+ }
363
+ },
364
+ "cells": [
365
+ {
366
+ "cell_type": "code",
367
+ "execution_count": 1,
368
+ "metadata": {
369
+ "colab": {
370
+ "base_uri": "https://localhost:8080/"
371
+ },
372
+ "id": "uoEz8DyTYUts",
373
+ "outputId": "762f8194-bb68-4641-fd00-30ef770fdaa3"
374
+ },
375
+ "outputs": [
376
+ {
377
+ "output_type": "stream",
378
+ "name": "stdout",
379
+ "text": [
380
+ "Collecting datasets\n",
381
+ " Downloading datasets-3.2.0-py3-none-any.whl.metadata (20 kB)\n",
382
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.16.1)\n",
383
+ "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.26.4)\n",
384
+ "Requirement already satisfied: pyarrow>=15.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (17.0.0)\n",
385
+ "Collecting dill<0.3.9,>=0.3.0 (from datasets)\n",
386
+ " Downloading dill-0.3.8-py3-none-any.whl.metadata (10 kB)\n",
387
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.2.2)\n",
388
+ "Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.32.3)\n",
389
+ "Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.6)\n",
390
+ "Collecting xxhash (from datasets)\n",
391
+ " Downloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
392
+ "Collecting multiprocess<0.70.17 (from datasets)\n",
393
+ " Downloading multiprocess-0.70.16-py310-none-any.whl.metadata (7.2 kB)\n",
394
+ "Collecting fsspec<=2024.9.0,>=2023.1.0 (from fsspec[http]<=2024.9.0,>=2023.1.0->datasets)\n",
395
+ " Downloading fsspec-2024.9.0-py3-none-any.whl.metadata (11 kB)\n",
396
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.11.10)\n",
397
+ "Requirement already satisfied: huggingface-hub>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.26.5)\n",
398
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.2)\n",
399
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.2)\n",
400
+ "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.4.4)\n",
401
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
402
+ "Requirement already satisfied: async-timeout<6.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n",
403
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (24.2.0)\n",
404
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.5.0)\n",
405
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.1.0)\n",
406
+ "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (0.2.1)\n",
407
+ "Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.18.3)\n",
408
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.23.0->datasets) (4.12.2)\n",
409
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.4.0)\n",
410
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.10)\n",
411
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2.2.3)\n",
412
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2024.8.30)\n",
413
+ "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
414
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.2)\n",
415
+ "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.2)\n",
416
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.17.0)\n",
417
+ "Downloading datasets-3.2.0-py3-none-any.whl (480 kB)\n",
418
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m480.6/480.6 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
419
+ "\u001b[?25hDownloading dill-0.3.8-py3-none-any.whl (116 kB)\n",
420
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
421
+ "\u001b[?25hDownloading fsspec-2024.9.0-py3-none-any.whl (179 kB)\n",
422
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m179.3/179.3 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
423
+ "\u001b[?25hDownloading multiprocess-0.70.16-py310-none-any.whl (134 kB)\n",
424
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
425
+ "\u001b[?25hDownloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
426
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
427
+ "\u001b[?25hInstalling collected packages: xxhash, fsspec, dill, multiprocess, datasets\n",
428
+ " Attempting uninstall: fsspec\n",
429
+ " Found existing installation: fsspec 2024.10.0\n",
430
+ " Uninstalling fsspec-2024.10.0:\n",
431
+ " Successfully uninstalled fsspec-2024.10.0\n",
432
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
433
+ "gcsfs 2024.10.0 requires fsspec==2024.10.0, but you have fsspec 2024.9.0 which is incompatible.\u001b[0m\u001b[31m\n",
434
+ "\u001b[0mSuccessfully installed datasets-3.2.0 dill-0.3.8 fsspec-2024.9.0 multiprocess-0.70.16 xxhash-3.5.0\n"
435
+ ]
436
+ }
437
+ ],
438
+ "source": [
439
+ "!pip install datasets"
440
+ ]
441
+ },
442
+ {
443
+ "cell_type": "code",
444
+ "source": [
445
+ "!pip install huggingface_hub"
446
+ ],
447
+ "metadata": {
448
+ "colab": {
449
+ "base_uri": "https://localhost:8080/"
450
+ },
451
+ "id": "pnoqloVaYcZc",
452
+ "outputId": "2813901c-8723-4283-bc91-cf1f55c79f9e"
453
+ },
454
+ "execution_count": 2,
455
+ "outputs": [
456
+ {
457
+ "output_type": "stream",
458
+ "name": "stdout",
459
+ "text": [
460
+ "Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.26.5)\n",
461
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.16.1)\n",
462
+ "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2024.9.0)\n",
463
+ "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (24.2)\n",
464
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0.2)\n",
465
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.32.3)\n",
466
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.66.6)\n",
467
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.12.2)\n",
468
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.4.0)\n",
469
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.10)\n",
470
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.2.3)\n",
471
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2024.8.30)\n"
472
+ ]
473
+ }
474
+ ]
475
+ },
476
+ {
477
+ "cell_type": "code",
478
+ "source": [
479
+ "!pip install requests"
480
+ ],
481
+ "metadata": {
482
+ "colab": {
483
+ "base_uri": "https://localhost:8080/"
484
+ },
485
+ "id": "AV0maTmHY-ub",
486
+ "outputId": "b0185659-6307-40b5-a3af-e16483006fce"
487
+ },
488
+ "execution_count": 3,
489
+ "outputs": [
490
+ {
491
+ "output_type": "stream",
492
+ "name": "stdout",
493
+ "text": [
494
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (2.32.3)\n",
495
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests) (3.4.0)\n",
496
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests) (3.10)\n",
497
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests) (2.2.3)\n",
498
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests) (2024.8.30)\n"
499
+ ]
500
+ }
501
+ ]
502
+ },
503
+ {
504
+ "cell_type": "code",
505
+ "source": [
506
+ "import torch\n",
507
+ "import torch.nn as nn\n",
508
+ "import torch.optim as optim\n",
509
+ "from torchvision.models import efficientnet_b0\n",
510
+ "from torch.optim.lr_scheduler import CosineAnnealingLR\n",
511
+ "from torchvision import transforms\n",
512
+ "from torch.utils.data import DataLoader, Dataset\n",
513
+ "from torchvision.transforms import functional as F\n",
514
+ "from PIL import Image\n",
515
+ "import numpy as np\n",
516
+ "from sklearn.metrics import mean_absolute_error, mean_squared_error\n",
517
+ "from huggingface_hub import PyTorchModelHubMixin\n",
518
+ "import os\n",
519
+ "\n",
520
+ "\n",
521
+ "# Model Definition\n",
522
+ "class CustomGPSModel(nn.Module):\n",
523
+ " def __init__(self):\n",
524
+ " super(CustomGPSModel, self).__init__()\n",
525
+ "\n",
526
+ " # Load EfficientNet-B0 with pretrained weights\n",
527
+ " self.efficientnet = efficientnet_b0(pretrained=True)\n",
528
+ "\n",
529
+ " # Modify the final layer for regression (predicting latitude and longitude)\n",
530
+ " num_features = self.efficientnet.classifier[1].in_features\n",
531
+ " self.efficientnet.classifier[1] = nn.Linear(num_features, 2) # Output layer has 2 outputs for latitude & longitude\n",
532
+ "\n",
533
+ " # Freeze earlier layers except the last few\n",
534
+ " for param in self.efficientnet.features.parameters():\n",
535
+ " param.requires_grad = True\n",
536
+ "\n",
537
+ " def forward(self, x):\n",
538
+ " return self.efficientnet(x) # Forward pass through EfficientNet"
539
+ ],
540
+ "metadata": {
541
+ "id": "uBlw8T7r-EmY"
542
+ },
543
+ "execution_count": 4,
544
+ "outputs": []
545
+ },
546
+ {
547
+ "cell_type": "code",
548
+ "source": [
549
+ "from huggingface_hub import hf_hub_download\n",
550
+ "import torch\n",
551
+ "\n",
552
+ "path_name = \"efficientnet_gps_regressor_complete.pth\"\n",
553
+ "repo_name = \"CustomGPSModel_EfficientNetB0_Run2\"\n",
554
+ "organization_name = \"LAJ-519-Image-Project\"\n",
555
+ "\n",
556
+ "# Specify the repository and the filename of the model you want to load\n",
557
+ "repo_id = f\"{organization_name}/{repo_name}\"\n",
558
+ "filename = f\"{path_name}\"\n",
559
+ "\n",
560
+ "model_path = hf_hub_download(repo_id=repo_id, filename=filename)\n",
561
+ "\n",
562
+ "# Load the model using torch\n",
563
+ "model_test = torch.load(model_path)\n",
564
+ "model_test.eval()"
565
+ ],
566
+ "metadata": {
567
+ "colab": {
568
+ "base_uri": "https://localhost:8080/",
569
+ "height": 1000,
570
+ "referenced_widgets": [
571
+ "712ce69edaac4f628fd9dfd76b53eac4",
572
+ "36c6e1df7117444ebd530aec4bb0dacb",
573
+ "5bce52370cd641d5a9bd5cc1459b5a7b",
574
+ "082b691403a34f15bbe062d8f4d21c17",
575
+ "2320ec3596e546709f8c9ee73ce07548",
576
+ "c7e2d4daa56a48d79869bf0fadb7a34d",
577
+ "c011b5895afb48729adeb0be47cc08f4",
578
+ "ac49064e71784748b40ab9b44658426f",
579
+ "1dbbb0a6dba643dd83f5bfaad552dcd7",
580
+ "16b552f5d27741fbb8f8a284039b05b2",
581
+ "78c682f5754b4a35b5461cc59cb0c218"
582
+ ]
583
+ },
584
+ "id": "eVrRN-sKZQbq",
585
+ "outputId": "35115c5d-2a11-4b26-9523-ae769cf2fd7d"
586
+ },
587
+ "execution_count": 5,
588
+ "outputs": [
589
+ {
590
+ "output_type": "stream",
591
+ "name": "stderr",
592
+ "text": [
593
+ "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
594
+ "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
595
+ "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
596
+ "You will be able to reuse this secret in all of your notebooks.\n",
597
+ "Please note that authentication is recommended but still optional to access public models or datasets.\n",
598
+ " warnings.warn(\n"
599
+ ]
600
+ },
601
+ {
602
+ "output_type": "display_data",
603
+ "data": {
604
+ "text/plain": [
605
+ "efficientnet_gps_regressor_complete.pth: 0%| | 0.00/16.4M [00:00<?, ?B/s]"
606
+ ],
607
+ "application/vnd.jupyter.widget-view+json": {
608
+ "version_major": 2,
609
+ "version_minor": 0,
610
+ "model_id": "712ce69edaac4f628fd9dfd76b53eac4"
611
+ }
612
+ },
613
+ "metadata": {}
614
+ },
615
+ {
616
+ "output_type": "stream",
617
+ "name": "stderr",
618
+ "text": [
619
+ "<ipython-input-5-0484cba5ce8a>:15: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\n",
620
+ " model_test = torch.load(model_path)\n"
621
+ ]
622
+ },
623
+ {
624
+ "output_type": "execute_result",
625
+ "data": {
626
+ "text/plain": [
627
+ "CustomGPSModel(\n",
628
+ " (efficientnet): EfficientNet(\n",
629
+ " (features): Sequential(\n",
630
+ " (0): Conv2dNormActivation(\n",
631
+ " (0): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n",
632
+ " (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
633
+ " (2): SiLU(inplace=True)\n",
634
+ " )\n",
635
+ " (1): Sequential(\n",
636
+ " (0): MBConv(\n",
637
+ " (block): Sequential(\n",
638
+ " (0): Conv2dNormActivation(\n",
639
+ " (0): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=32, bias=False)\n",
640
+ " (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
641
+ " (2): SiLU(inplace=True)\n",
642
+ " )\n",
643
+ " (1): SqueezeExcitation(\n",
644
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
645
+ " (fc1): Conv2d(32, 8, kernel_size=(1, 1), stride=(1, 1))\n",
646
+ " (fc2): Conv2d(8, 32, kernel_size=(1, 1), stride=(1, 1))\n",
647
+ " (activation): SiLU(inplace=True)\n",
648
+ " (scale_activation): Sigmoid()\n",
649
+ " )\n",
650
+ " (2): Conv2dNormActivation(\n",
651
+ " (0): Conv2d(32, 16, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
652
+ " (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
653
+ " )\n",
654
+ " )\n",
655
+ " (stochastic_depth): StochasticDepth(p=0.0, mode=row)\n",
656
+ " )\n",
657
+ " )\n",
658
+ " (2): Sequential(\n",
659
+ " (0): MBConv(\n",
660
+ " (block): Sequential(\n",
661
+ " (0): Conv2dNormActivation(\n",
662
+ " (0): Conv2d(16, 96, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
663
+ " (1): BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
664
+ " (2): SiLU(inplace=True)\n",
665
+ " )\n",
666
+ " (1): Conv2dNormActivation(\n",
667
+ " (0): Conv2d(96, 96, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=96, bias=False)\n",
668
+ " (1): BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
669
+ " (2): SiLU(inplace=True)\n",
670
+ " )\n",
671
+ " (2): SqueezeExcitation(\n",
672
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
673
+ " (fc1): Conv2d(96, 4, kernel_size=(1, 1), stride=(1, 1))\n",
674
+ " (fc2): Conv2d(4, 96, kernel_size=(1, 1), stride=(1, 1))\n",
675
+ " (activation): SiLU(inplace=True)\n",
676
+ " (scale_activation): Sigmoid()\n",
677
+ " )\n",
678
+ " (3): Conv2dNormActivation(\n",
679
+ " (0): Conv2d(96, 24, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
680
+ " (1): BatchNorm2d(24, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
681
+ " )\n",
682
+ " )\n",
683
+ " (stochastic_depth): StochasticDepth(p=0.0125, mode=row)\n",
684
+ " )\n",
685
+ " (1): MBConv(\n",
686
+ " (block): Sequential(\n",
687
+ " (0): Conv2dNormActivation(\n",
688
+ " (0): Conv2d(24, 144, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
689
+ " (1): BatchNorm2d(144, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
690
+ " (2): SiLU(inplace=True)\n",
691
+ " )\n",
692
+ " (1): Conv2dNormActivation(\n",
693
+ " (0): Conv2d(144, 144, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=144, bias=False)\n",
694
+ " (1): BatchNorm2d(144, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
695
+ " (2): SiLU(inplace=True)\n",
696
+ " )\n",
697
+ " (2): SqueezeExcitation(\n",
698
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
699
+ " (fc1): Conv2d(144, 6, kernel_size=(1, 1), stride=(1, 1))\n",
700
+ " (fc2): Conv2d(6, 144, kernel_size=(1, 1), stride=(1, 1))\n",
701
+ " (activation): SiLU(inplace=True)\n",
702
+ " (scale_activation): Sigmoid()\n",
703
+ " )\n",
704
+ " (3): Conv2dNormActivation(\n",
705
+ " (0): Conv2d(144, 24, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
706
+ " (1): BatchNorm2d(24, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
707
+ " )\n",
708
+ " )\n",
709
+ " (stochastic_depth): StochasticDepth(p=0.025, mode=row)\n",
710
+ " )\n",
711
+ " )\n",
712
+ " (3): Sequential(\n",
713
+ " (0): MBConv(\n",
714
+ " (block): Sequential(\n",
715
+ " (0): Conv2dNormActivation(\n",
716
+ " (0): Conv2d(24, 144, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
717
+ " (1): BatchNorm2d(144, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
718
+ " (2): SiLU(inplace=True)\n",
719
+ " )\n",
720
+ " (1): Conv2dNormActivation(\n",
721
+ " (0): Conv2d(144, 144, kernel_size=(5, 5), stride=(2, 2), padding=(2, 2), groups=144, bias=False)\n",
722
+ " (1): BatchNorm2d(144, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
723
+ " (2): SiLU(inplace=True)\n",
724
+ " )\n",
725
+ " (2): SqueezeExcitation(\n",
726
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
727
+ " (fc1): Conv2d(144, 6, kernel_size=(1, 1), stride=(1, 1))\n",
728
+ " (fc2): Conv2d(6, 144, kernel_size=(1, 1), stride=(1, 1))\n",
729
+ " (activation): SiLU(inplace=True)\n",
730
+ " (scale_activation): Sigmoid()\n",
731
+ " )\n",
732
+ " (3): Conv2dNormActivation(\n",
733
+ " (0): Conv2d(144, 40, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
734
+ " (1): BatchNorm2d(40, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
735
+ " )\n",
736
+ " )\n",
737
+ " (stochastic_depth): StochasticDepth(p=0.037500000000000006, mode=row)\n",
738
+ " )\n",
739
+ " (1): MBConv(\n",
740
+ " (block): Sequential(\n",
741
+ " (0): Conv2dNormActivation(\n",
742
+ " (0): Conv2d(40, 240, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
743
+ " (1): BatchNorm2d(240, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
744
+ " (2): SiLU(inplace=True)\n",
745
+ " )\n",
746
+ " (1): Conv2dNormActivation(\n",
747
+ " (0): Conv2d(240, 240, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=240, bias=False)\n",
748
+ " (1): BatchNorm2d(240, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
749
+ " (2): SiLU(inplace=True)\n",
750
+ " )\n",
751
+ " (2): SqueezeExcitation(\n",
752
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
753
+ " (fc1): Conv2d(240, 10, kernel_size=(1, 1), stride=(1, 1))\n",
754
+ " (fc2): Conv2d(10, 240, kernel_size=(1, 1), stride=(1, 1))\n",
755
+ " (activation): SiLU(inplace=True)\n",
756
+ " (scale_activation): Sigmoid()\n",
757
+ " )\n",
758
+ " (3): Conv2dNormActivation(\n",
759
+ " (0): Conv2d(240, 40, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
760
+ " (1): BatchNorm2d(40, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
761
+ " )\n",
762
+ " )\n",
763
+ " (stochastic_depth): StochasticDepth(p=0.05, mode=row)\n",
764
+ " )\n",
765
+ " )\n",
766
+ " (4): Sequential(\n",
767
+ " (0): MBConv(\n",
768
+ " (block): Sequential(\n",
769
+ " (0): Conv2dNormActivation(\n",
770
+ " (0): Conv2d(40, 240, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
771
+ " (1): BatchNorm2d(240, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
772
+ " (2): SiLU(inplace=True)\n",
773
+ " )\n",
774
+ " (1): Conv2dNormActivation(\n",
775
+ " (0): Conv2d(240, 240, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=240, bias=False)\n",
776
+ " (1): BatchNorm2d(240, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
777
+ " (2): SiLU(inplace=True)\n",
778
+ " )\n",
779
+ " (2): SqueezeExcitation(\n",
780
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
781
+ " (fc1): Conv2d(240, 10, kernel_size=(1, 1), stride=(1, 1))\n",
782
+ " (fc2): Conv2d(10, 240, kernel_size=(1, 1), stride=(1, 1))\n",
783
+ " (activation): SiLU(inplace=True)\n",
784
+ " (scale_activation): Sigmoid()\n",
785
+ " )\n",
786
+ " (3): Conv2dNormActivation(\n",
787
+ " (0): Conv2d(240, 80, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
788
+ " (1): BatchNorm2d(80, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
789
+ " )\n",
790
+ " )\n",
791
+ " (stochastic_depth): StochasticDepth(p=0.0625, mode=row)\n",
792
+ " )\n",
793
+ " (1): MBConv(\n",
794
+ " (block): Sequential(\n",
795
+ " (0): Conv2dNormActivation(\n",
796
+ " (0): Conv2d(80, 480, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
797
+ " (1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
798
+ " (2): SiLU(inplace=True)\n",
799
+ " )\n",
800
+ " (1): Conv2dNormActivation(\n",
801
+ " (0): Conv2d(480, 480, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=480, bias=False)\n",
802
+ " (1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
803
+ " (2): SiLU(inplace=True)\n",
804
+ " )\n",
805
+ " (2): SqueezeExcitation(\n",
806
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
807
+ " (fc1): Conv2d(480, 20, kernel_size=(1, 1), stride=(1, 1))\n",
808
+ " (fc2): Conv2d(20, 480, kernel_size=(1, 1), stride=(1, 1))\n",
809
+ " (activation): SiLU(inplace=True)\n",
810
+ " (scale_activation): Sigmoid()\n",
811
+ " )\n",
812
+ " (3): Conv2dNormActivation(\n",
813
+ " (0): Conv2d(480, 80, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
814
+ " (1): BatchNorm2d(80, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
815
+ " )\n",
816
+ " )\n",
817
+ " (stochastic_depth): StochasticDepth(p=0.07500000000000001, mode=row)\n",
818
+ " )\n",
819
+ " (2): MBConv(\n",
820
+ " (block): Sequential(\n",
821
+ " (0): Conv2dNormActivation(\n",
822
+ " (0): Conv2d(80, 480, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
823
+ " (1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
824
+ " (2): SiLU(inplace=True)\n",
825
+ " )\n",
826
+ " (1): Conv2dNormActivation(\n",
827
+ " (0): Conv2d(480, 480, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=480, bias=False)\n",
828
+ " (1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
829
+ " (2): SiLU(inplace=True)\n",
830
+ " )\n",
831
+ " (2): SqueezeExcitation(\n",
832
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
833
+ " (fc1): Conv2d(480, 20, kernel_size=(1, 1), stride=(1, 1))\n",
834
+ " (fc2): Conv2d(20, 480, kernel_size=(1, 1), stride=(1, 1))\n",
835
+ " (activation): SiLU(inplace=True)\n",
836
+ " (scale_activation): Sigmoid()\n",
837
+ " )\n",
838
+ " (3): Conv2dNormActivation(\n",
839
+ " (0): Conv2d(480, 80, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
840
+ " (1): BatchNorm2d(80, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
841
+ " )\n",
842
+ " )\n",
843
+ " (stochastic_depth): StochasticDepth(p=0.08750000000000001, mode=row)\n",
844
+ " )\n",
845
+ " )\n",
846
+ " (5): Sequential(\n",
847
+ " (0): MBConv(\n",
848
+ " (block): Sequential(\n",
849
+ " (0): Conv2dNormActivation(\n",
850
+ " (0): Conv2d(80, 480, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
851
+ " (1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
852
+ " (2): SiLU(inplace=True)\n",
853
+ " )\n",
854
+ " (1): Conv2dNormActivation(\n",
855
+ " (0): Conv2d(480, 480, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=480, bias=False)\n",
856
+ " (1): BatchNorm2d(480, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
857
+ " (2): SiLU(inplace=True)\n",
858
+ " )\n",
859
+ " (2): SqueezeExcitation(\n",
860
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
861
+ " (fc1): Conv2d(480, 20, kernel_size=(1, 1), stride=(1, 1))\n",
862
+ " (fc2): Conv2d(20, 480, kernel_size=(1, 1), stride=(1, 1))\n",
863
+ " (activation): SiLU(inplace=True)\n",
864
+ " (scale_activation): Sigmoid()\n",
865
+ " )\n",
866
+ " (3): Conv2dNormActivation(\n",
867
+ " (0): Conv2d(480, 112, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
868
+ " (1): BatchNorm2d(112, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
869
+ " )\n",
870
+ " )\n",
871
+ " (stochastic_depth): StochasticDepth(p=0.1, mode=row)\n",
872
+ " )\n",
873
+ " (1): MBConv(\n",
874
+ " (block): Sequential(\n",
875
+ " (0): Conv2dNormActivation(\n",
876
+ " (0): Conv2d(112, 672, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
877
+ " (1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
878
+ " (2): SiLU(inplace=True)\n",
879
+ " )\n",
880
+ " (1): Conv2dNormActivation(\n",
881
+ " (0): Conv2d(672, 672, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=672, bias=False)\n",
882
+ " (1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
883
+ " (2): SiLU(inplace=True)\n",
884
+ " )\n",
885
+ " (2): SqueezeExcitation(\n",
886
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
887
+ " (fc1): Conv2d(672, 28, kernel_size=(1, 1), stride=(1, 1))\n",
888
+ " (fc2): Conv2d(28, 672, kernel_size=(1, 1), stride=(1, 1))\n",
889
+ " (activation): SiLU(inplace=True)\n",
890
+ " (scale_activation): Sigmoid()\n",
891
+ " )\n",
892
+ " (3): Conv2dNormActivation(\n",
893
+ " (0): Conv2d(672, 112, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
894
+ " (1): BatchNorm2d(112, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
895
+ " )\n",
896
+ " )\n",
897
+ " (stochastic_depth): StochasticDepth(p=0.1125, mode=row)\n",
898
+ " )\n",
899
+ " (2): MBConv(\n",
900
+ " (block): Sequential(\n",
901
+ " (0): Conv2dNormActivation(\n",
902
+ " (0): Conv2d(112, 672, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
903
+ " (1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
904
+ " (2): SiLU(inplace=True)\n",
905
+ " )\n",
906
+ " (1): Conv2dNormActivation(\n",
907
+ " (0): Conv2d(672, 672, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=672, bias=False)\n",
908
+ " (1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
909
+ " (2): SiLU(inplace=True)\n",
910
+ " )\n",
911
+ " (2): SqueezeExcitation(\n",
912
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
913
+ " (fc1): Conv2d(672, 28, kernel_size=(1, 1), stride=(1, 1))\n",
914
+ " (fc2): Conv2d(28, 672, kernel_size=(1, 1), stride=(1, 1))\n",
915
+ " (activation): SiLU(inplace=True)\n",
916
+ " (scale_activation): Sigmoid()\n",
917
+ " )\n",
918
+ " (3): Conv2dNormActivation(\n",
919
+ " (0): Conv2d(672, 112, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
920
+ " (1): BatchNorm2d(112, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
921
+ " )\n",
922
+ " )\n",
923
+ " (stochastic_depth): StochasticDepth(p=0.125, mode=row)\n",
924
+ " )\n",
925
+ " )\n",
926
+ " (6): Sequential(\n",
927
+ " (0): MBConv(\n",
928
+ " (block): Sequential(\n",
929
+ " (0): Conv2dNormActivation(\n",
930
+ " (0): Conv2d(112, 672, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
931
+ " (1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
932
+ " (2): SiLU(inplace=True)\n",
933
+ " )\n",
934
+ " (1): Conv2dNormActivation(\n",
935
+ " (0): Conv2d(672, 672, kernel_size=(5, 5), stride=(2, 2), padding=(2, 2), groups=672, bias=False)\n",
936
+ " (1): BatchNorm2d(672, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
937
+ " (2): SiLU(inplace=True)\n",
938
+ " )\n",
939
+ " (2): SqueezeExcitation(\n",
940
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
941
+ " (fc1): Conv2d(672, 28, kernel_size=(1, 1), stride=(1, 1))\n",
942
+ " (fc2): Conv2d(28, 672, kernel_size=(1, 1), stride=(1, 1))\n",
943
+ " (activation): SiLU(inplace=True)\n",
944
+ " (scale_activation): Sigmoid()\n",
945
+ " )\n",
946
+ " (3): Conv2dNormActivation(\n",
947
+ " (0): Conv2d(672, 192, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
948
+ " (1): BatchNorm2d(192, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
949
+ " )\n",
950
+ " )\n",
951
+ " (stochastic_depth): StochasticDepth(p=0.1375, mode=row)\n",
952
+ " )\n",
953
+ " (1): MBConv(\n",
954
+ " (block): Sequential(\n",
955
+ " (0): Conv2dNormActivation(\n",
956
+ " (0): Conv2d(192, 1152, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
957
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
958
+ " (2): SiLU(inplace=True)\n",
959
+ " )\n",
960
+ " (1): Conv2dNormActivation(\n",
961
+ " (0): Conv2d(1152, 1152, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=1152, bias=False)\n",
962
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
963
+ " (2): SiLU(inplace=True)\n",
964
+ " )\n",
965
+ " (2): SqueezeExcitation(\n",
966
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
967
+ " (fc1): Conv2d(1152, 48, kernel_size=(1, 1), stride=(1, 1))\n",
968
+ " (fc2): Conv2d(48, 1152, kernel_size=(1, 1), stride=(1, 1))\n",
969
+ " (activation): SiLU(inplace=True)\n",
970
+ " (scale_activation): Sigmoid()\n",
971
+ " )\n",
972
+ " (3): Conv2dNormActivation(\n",
973
+ " (0): Conv2d(1152, 192, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
974
+ " (1): BatchNorm2d(192, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
975
+ " )\n",
976
+ " )\n",
977
+ " (stochastic_depth): StochasticDepth(p=0.15000000000000002, mode=row)\n",
978
+ " )\n",
979
+ " (2): MBConv(\n",
980
+ " (block): Sequential(\n",
981
+ " (0): Conv2dNormActivation(\n",
982
+ " (0): Conv2d(192, 1152, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
983
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
984
+ " (2): SiLU(inplace=True)\n",
985
+ " )\n",
986
+ " (1): Conv2dNormActivation(\n",
987
+ " (0): Conv2d(1152, 1152, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=1152, bias=False)\n",
988
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
989
+ " (2): SiLU(inplace=True)\n",
990
+ " )\n",
991
+ " (2): SqueezeExcitation(\n",
992
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
993
+ " (fc1): Conv2d(1152, 48, kernel_size=(1, 1), stride=(1, 1))\n",
994
+ " (fc2): Conv2d(48, 1152, kernel_size=(1, 1), stride=(1, 1))\n",
995
+ " (activation): SiLU(inplace=True)\n",
996
+ " (scale_activation): Sigmoid()\n",
997
+ " )\n",
998
+ " (3): Conv2dNormActivation(\n",
999
+ " (0): Conv2d(1152, 192, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1000
+ " (1): BatchNorm2d(192, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1001
+ " )\n",
1002
+ " )\n",
1003
+ " (stochastic_depth): StochasticDepth(p=0.1625, mode=row)\n",
1004
+ " )\n",
1005
+ " (3): MBConv(\n",
1006
+ " (block): Sequential(\n",
1007
+ " (0): Conv2dNormActivation(\n",
1008
+ " (0): Conv2d(192, 1152, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1009
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1010
+ " (2): SiLU(inplace=True)\n",
1011
+ " )\n",
1012
+ " (1): Conv2dNormActivation(\n",
1013
+ " (0): Conv2d(1152, 1152, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2), groups=1152, bias=False)\n",
1014
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1015
+ " (2): SiLU(inplace=True)\n",
1016
+ " )\n",
1017
+ " (2): SqueezeExcitation(\n",
1018
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1019
+ " (fc1): Conv2d(1152, 48, kernel_size=(1, 1), stride=(1, 1))\n",
1020
+ " (fc2): Conv2d(48, 1152, kernel_size=(1, 1), stride=(1, 1))\n",
1021
+ " (activation): SiLU(inplace=True)\n",
1022
+ " (scale_activation): Sigmoid()\n",
1023
+ " )\n",
1024
+ " (3): Conv2dNormActivation(\n",
1025
+ " (0): Conv2d(1152, 192, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1026
+ " (1): BatchNorm2d(192, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1027
+ " )\n",
1028
+ " )\n",
1029
+ " (stochastic_depth): StochasticDepth(p=0.17500000000000002, mode=row)\n",
1030
+ " )\n",
1031
+ " )\n",
1032
+ " (7): Sequential(\n",
1033
+ " (0): MBConv(\n",
1034
+ " (block): Sequential(\n",
1035
+ " (0): Conv2dNormActivation(\n",
1036
+ " (0): Conv2d(192, 1152, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1037
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1038
+ " (2): SiLU(inplace=True)\n",
1039
+ " )\n",
1040
+ " (1): Conv2dNormActivation(\n",
1041
+ " (0): Conv2d(1152, 1152, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1152, bias=False)\n",
1042
+ " (1): BatchNorm2d(1152, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1043
+ " (2): SiLU(inplace=True)\n",
1044
+ " )\n",
1045
+ " (2): SqueezeExcitation(\n",
1046
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1047
+ " (fc1): Conv2d(1152, 48, kernel_size=(1, 1), stride=(1, 1))\n",
1048
+ " (fc2): Conv2d(48, 1152, kernel_size=(1, 1), stride=(1, 1))\n",
1049
+ " (activation): SiLU(inplace=True)\n",
1050
+ " (scale_activation): Sigmoid()\n",
1051
+ " )\n",
1052
+ " (3): Conv2dNormActivation(\n",
1053
+ " (0): Conv2d(1152, 320, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1054
+ " (1): BatchNorm2d(320, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1055
+ " )\n",
1056
+ " )\n",
1057
+ " (stochastic_depth): StochasticDepth(p=0.1875, mode=row)\n",
1058
+ " )\n",
1059
+ " )\n",
1060
+ " (8): Conv2dNormActivation(\n",
1061
+ " (0): Conv2d(320, 1280, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1062
+ " (1): BatchNorm2d(1280, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n",
1063
+ " (2): SiLU(inplace=True)\n",
1064
+ " )\n",
1065
+ " )\n",
1066
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1067
+ " (classifier): Sequential(\n",
1068
+ " (0): Dropout(p=0.2, inplace=True)\n",
1069
+ " (1): Linear(in_features=1280, out_features=2, bias=True)\n",
1070
+ " )\n",
1071
+ " )\n",
1072
+ ")"
1073
+ ]
1074
+ },
1075
+ "metadata": {},
1076
+ "execution_count": 5
1077
+ }
1078
+ ]
1079
+ },
1080
+ {
1081
+ "cell_type": "code",
1082
+ "source": [],
1083
+ "metadata": {
1084
+ "id": "TGNyzqg-O6R9"
1085
+ },
1086
+ "execution_count": null,
1087
+ "outputs": []
1088
+ }
1089
+ ]
1090
+ }