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{
|
10 |
+
"name": "python3",
|
11 |
+
"display_name": "Python 3"
|
12 |
+
},
|
13 |
+
"language_info": {
|
14 |
+
"name": "python"
|
15 |
+
},
|
16 |
+
"widgets": {
|
17 |
+
"application/vnd.jupyter.widget-state+json": {
|
18 |
+
"5f13d9666abd4744bffdea06bd5b81db": {
|
19 |
+
"model_module": "@jupyter-widgets/controls",
|
20 |
+
"model_name": "HBoxModel",
|
21 |
+
"model_module_version": "1.5.0",
|
22 |
+
"state": {
|
23 |
+
"_dom_classes": [],
|
24 |
+
"_model_module": "@jupyter-widgets/controls",
|
25 |
+
"_model_module_version": "1.5.0",
|
26 |
+
"_model_name": "HBoxModel",
|
27 |
+
"_view_count": null,
|
28 |
+
"_view_module": "@jupyter-widgets/controls",
|
29 |
+
"_view_module_version": "1.5.0",
|
30 |
+
"_view_name": "HBoxView",
|
31 |
+
"box_style": "",
|
32 |
+
"children": [
|
33 |
+
"IPY_MODEL_cc42f87c43db4ac483e3cf451a2ec7b5",
|
34 |
+
"IPY_MODEL_eaaa7f22662b444d8b6065e6feb84acf",
|
35 |
+
"IPY_MODEL_fa561ad40bc14cde8f3c8fa3e86e0174"
|
36 |
+
],
|
37 |
+
"layout": "IPY_MODEL_8d7aea0c66524922ae5db50092e1a7c8"
|
38 |
+
}
|
39 |
+
},
|
40 |
+
"cc42f87c43db4ac483e3cf451a2ec7b5": {
|
41 |
+
"model_module": "@jupyter-widgets/controls",
|
42 |
+
"model_name": "HTMLModel",
|
43 |
+
"model_module_version": "1.5.0",
|
44 |
+
"state": {
|
45 |
+
"_dom_classes": [],
|
46 |
+
"_model_module": "@jupyter-widgets/controls",
|
47 |
+
"_model_module_version": "1.5.0",
|
48 |
+
"_model_name": "HTMLModel",
|
49 |
+
"_view_count": null,
|
50 |
+
"_view_module": "@jupyter-widgets/controls",
|
51 |
+
"_view_module_version": "1.5.0",
|
52 |
+
"_view_name": "HTMLView",
|
53 |
+
"description": "",
|
54 |
+
"description_tooltip": null,
|
55 |
+
"layout": "IPY_MODEL_a642623cdd40432b809de48d93ae1e0c",
|
56 |
+
"placeholder": "",
|
57 |
+
"style": "IPY_MODEL_962d6b4177104711a907ccdf733d8200",
|
58 |
+
"value": "100%"
|
59 |
+
}
|
60 |
+
},
|
61 |
+
"eaaa7f22662b444d8b6065e6feb84acf": {
|
62 |
+
"model_module": "@jupyter-widgets/controls",
|
63 |
+
"model_name": "FloatProgressModel",
|
64 |
+
"model_module_version": "1.5.0",
|
65 |
+
"state": {
|
66 |
+
"_dom_classes": [],
|
67 |
+
"_model_module": "@jupyter-widgets/controls",
|
68 |
+
"_model_module_version": "1.5.0",
|
69 |
+
"_model_name": "FloatProgressModel",
|
70 |
+
"_view_count": null,
|
71 |
+
"_view_module": "@jupyter-widgets/controls",
|
72 |
+
"_view_module_version": "1.5.0",
|
73 |
+
"_view_name": "ProgressView",
|
74 |
+
"bar_style": "success",
|
75 |
+
"description": "",
|
76 |
+
"description_tooltip": null,
|
77 |
+
"layout": "IPY_MODEL_5f3b97e945354da7aab13a945541fe0c",
|
78 |
+
"max": 46830571,
|
79 |
+
"min": 0,
|
80 |
+
"orientation": "horizontal",
|
81 |
+
"style": "IPY_MODEL_a67ff5848e044d4883ad09aab3d8f4bf",
|
82 |
+
"value": 46830571
|
83 |
+
}
|
84 |
+
},
|
85 |
+
"fa561ad40bc14cde8f3c8fa3e86e0174": {
|
86 |
+
"model_module": "@jupyter-widgets/controls",
|
87 |
+
"model_name": "HTMLModel",
|
88 |
+
"model_module_version": "1.5.0",
|
89 |
+
"state": {
|
90 |
+
"_dom_classes": [],
|
91 |
+
"_model_module": "@jupyter-widgets/controls",
|
92 |
+
"_model_module_version": "1.5.0",
|
93 |
+
"_model_name": "HTMLModel",
|
94 |
+
"_view_count": null,
|
95 |
+
"_view_module": "@jupyter-widgets/controls",
|
96 |
+
"_view_module_version": "1.5.0",
|
97 |
+
"_view_name": "HTMLView",
|
98 |
+
"description": "",
|
99 |
+
"description_tooltip": null,
|
100 |
+
"layout": "IPY_MODEL_3a213099ead44040bbc2df31b6801af8",
|
101 |
+
"placeholder": "",
|
102 |
+
"style": "IPY_MODEL_fc68d192c3194b60bcf160ed8a85d77a",
|
103 |
+
"value": " 44.7M/44.7M [00:00<00:00, 119MB/s]"
|
104 |
+
}
|
105 |
+
},
|
106 |
+
"8d7aea0c66524922ae5db50092e1a7c8": {
|
107 |
+
"model_module": "@jupyter-widgets/base",
|
108 |
+
"model_name": "LayoutModel",
|
109 |
+
"model_module_version": "1.2.0",
|
110 |
+
"state": {
|
111 |
+
"_model_module": "@jupyter-widgets/base",
|
112 |
+
"_model_module_version": "1.2.0",
|
113 |
+
"_model_name": "LayoutModel",
|
114 |
+
"_view_count": null,
|
115 |
+
"_view_module": "@jupyter-widgets/base",
|
116 |
+
"_view_module_version": "1.2.0",
|
117 |
+
"_view_name": "LayoutView",
|
118 |
+
"align_content": null,
|
119 |
+
"align_items": null,
|
120 |
+
"align_self": null,
|
121 |
+
"border": null,
|
122 |
+
"bottom": null,
|
123 |
+
"display": null,
|
124 |
+
"flex": null,
|
125 |
+
"flex_flow": null,
|
126 |
+
"grid_area": null,
|
127 |
+
"grid_auto_columns": null,
|
128 |
+
"grid_auto_flow": null,
|
129 |
+
"grid_auto_rows": null,
|
130 |
+
"grid_column": null,
|
131 |
+
"grid_gap": null,
|
132 |
+
"grid_row": null,
|
133 |
+
"grid_template_areas": null,
|
134 |
+
"grid_template_columns": null,
|
135 |
+
"grid_template_rows": null,
|
136 |
+
"height": null,
|
137 |
+
"justify_content": null,
|
138 |
+
"justify_items": null,
|
139 |
+
"left": null,
|
140 |
+
"margin": null,
|
141 |
+
"max_height": null,
|
142 |
+
"max_width": null,
|
143 |
+
"min_height": null,
|
144 |
+
"min_width": null,
|
145 |
+
"object_fit": null,
|
146 |
+
"object_position": null,
|
147 |
+
"order": null,
|
148 |
+
"overflow": null,
|
149 |
+
"overflow_x": null,
|
150 |
+
"overflow_y": null,
|
151 |
+
"padding": null,
|
152 |
+
"right": null,
|
153 |
+
"top": null,
|
154 |
+
"visibility": null,
|
155 |
+
"width": null
|
156 |
+
}
|
157 |
+
},
|
158 |
+
"a642623cdd40432b809de48d93ae1e0c": {
|
159 |
+
"model_module": "@jupyter-widgets/base",
|
160 |
+
"model_name": "LayoutModel",
|
161 |
+
"model_module_version": "1.2.0",
|
162 |
+
"state": {
|
163 |
+
"_model_module": "@jupyter-widgets/base",
|
164 |
+
"_model_module_version": "1.2.0",
|
165 |
+
"_model_name": "LayoutModel",
|
166 |
+
"_view_count": null,
|
167 |
+
"_view_module": "@jupyter-widgets/base",
|
168 |
+
"_view_module_version": "1.2.0",
|
169 |
+
"_view_name": "LayoutView",
|
170 |
+
"align_content": null,
|
171 |
+
"align_items": null,
|
172 |
+
"align_self": null,
|
173 |
+
"border": null,
|
174 |
+
"bottom": null,
|
175 |
+
"display": null,
|
176 |
+
"flex": null,
|
177 |
+
"flex_flow": null,
|
178 |
+
"grid_area": null,
|
179 |
+
"grid_auto_columns": null,
|
180 |
+
"grid_auto_flow": null,
|
181 |
+
"grid_auto_rows": null,
|
182 |
+
"grid_column": null,
|
183 |
+
"grid_gap": null,
|
184 |
+
"grid_row": null,
|
185 |
+
"grid_template_areas": null,
|
186 |
+
"grid_template_columns": null,
|
187 |
+
"grid_template_rows": null,
|
188 |
+
"height": null,
|
189 |
+
"justify_content": null,
|
190 |
+
"justify_items": null,
|
191 |
+
"left": null,
|
192 |
+
"margin": null,
|
193 |
+
"max_height": null,
|
194 |
+
"max_width": null,
|
195 |
+
"min_height": null,
|
196 |
+
"min_width": null,
|
197 |
+
"object_fit": null,
|
198 |
+
"object_position": null,
|
199 |
+
"order": null,
|
200 |
+
"overflow": null,
|
201 |
+
"overflow_x": null,
|
202 |
+
"overflow_y": null,
|
203 |
+
"padding": null,
|
204 |
+
"right": null,
|
205 |
+
"top": null,
|
206 |
+
"visibility": null,
|
207 |
+
"width": null
|
208 |
+
}
|
209 |
+
},
|
210 |
+
"962d6b4177104711a907ccdf733d8200": {
|
211 |
+
"model_module": "@jupyter-widgets/controls",
|
212 |
+
"model_name": "DescriptionStyleModel",
|
213 |
+
"model_module_version": "1.5.0",
|
214 |
+
"state": {
|
215 |
+
"_model_module": "@jupyter-widgets/controls",
|
216 |
+
"_model_module_version": "1.5.0",
|
217 |
+
"_model_name": "DescriptionStyleModel",
|
218 |
+
"_view_count": null,
|
219 |
+
"_view_module": "@jupyter-widgets/base",
|
220 |
+
"_view_module_version": "1.2.0",
|
221 |
+
"_view_name": "StyleView",
|
222 |
+
"description_width": ""
|
223 |
+
}
|
224 |
+
},
|
225 |
+
"5f3b97e945354da7aab13a945541fe0c": {
|
226 |
+
"model_module": "@jupyter-widgets/base",
|
227 |
+
"model_name": "LayoutModel",
|
228 |
+
"model_module_version": "1.2.0",
|
229 |
+
"state": {
|
230 |
+
"_model_module": "@jupyter-widgets/base",
|
231 |
+
"_model_module_version": "1.2.0",
|
232 |
+
"_model_name": "LayoutModel",
|
233 |
+
"_view_count": null,
|
234 |
+
"_view_module": "@jupyter-widgets/base",
|
235 |
+
"_view_module_version": "1.2.0",
|
236 |
+
"_view_name": "LayoutView",
|
237 |
+
"align_content": null,
|
238 |
+
"align_items": null,
|
239 |
+
"align_self": null,
|
240 |
+
"border": null,
|
241 |
+
"bottom": null,
|
242 |
+
"display": null,
|
243 |
+
"flex": null,
|
244 |
+
"flex_flow": null,
|
245 |
+
"grid_area": null,
|
246 |
+
"grid_auto_columns": null,
|
247 |
+
"grid_auto_flow": null,
|
248 |
+
"grid_auto_rows": null,
|
249 |
+
"grid_column": null,
|
250 |
+
"grid_gap": null,
|
251 |
+
"grid_row": null,
|
252 |
+
"grid_template_areas": null,
|
253 |
+
"grid_template_columns": null,
|
254 |
+
"grid_template_rows": null,
|
255 |
+
"height": null,
|
256 |
+
"justify_content": null,
|
257 |
+
"justify_items": null,
|
258 |
+
"left": null,
|
259 |
+
"margin": null,
|
260 |
+
"max_height": null,
|
261 |
+
"max_width": null,
|
262 |
+
"min_height": null,
|
263 |
+
"min_width": null,
|
264 |
+
"object_fit": null,
|
265 |
+
"object_position": null,
|
266 |
+
"order": null,
|
267 |
+
"overflow": null,
|
268 |
+
"overflow_x": null,
|
269 |
+
"overflow_y": null,
|
270 |
+
"padding": null,
|
271 |
+
"right": null,
|
272 |
+
"top": null,
|
273 |
+
"visibility": null,
|
274 |
+
"width": null
|
275 |
+
}
|
276 |
+
},
|
277 |
+
"a67ff5848e044d4883ad09aab3d8f4bf": {
|
278 |
+
"model_module": "@jupyter-widgets/controls",
|
279 |
+
"model_name": "ProgressStyleModel",
|
280 |
+
"model_module_version": "1.5.0",
|
281 |
+
"state": {
|
282 |
+
"_model_module": "@jupyter-widgets/controls",
|
283 |
+
"_model_module_version": "1.5.0",
|
284 |
+
"_model_name": "ProgressStyleModel",
|
285 |
+
"_view_count": null,
|
286 |
+
"_view_module": "@jupyter-widgets/base",
|
287 |
+
"_view_module_version": "1.2.0",
|
288 |
+
"_view_name": "StyleView",
|
289 |
+
"bar_color": null,
|
290 |
+
"description_width": ""
|
291 |
+
}
|
292 |
+
},
|
293 |
+
"3a213099ead44040bbc2df31b6801af8": {
|
294 |
+
"model_module": "@jupyter-widgets/base",
|
295 |
+
"model_name": "LayoutModel",
|
296 |
+
"model_module_version": "1.2.0",
|
297 |
+
"state": {
|
298 |
+
"_model_module": "@jupyter-widgets/base",
|
299 |
+
"_model_module_version": "1.2.0",
|
300 |
+
"_model_name": "LayoutModel",
|
301 |
+
"_view_count": null,
|
302 |
+
"_view_module": "@jupyter-widgets/base",
|
303 |
+
"_view_module_version": "1.2.0",
|
304 |
+
"_view_name": "LayoutView",
|
305 |
+
"align_content": null,
|
306 |
+
"align_items": null,
|
307 |
+
"align_self": null,
|
308 |
+
"border": null,
|
309 |
+
"bottom": null,
|
310 |
+
"display": null,
|
311 |
+
"flex": null,
|
312 |
+
"flex_flow": null,
|
313 |
+
"grid_area": null,
|
314 |
+
"grid_auto_columns": null,
|
315 |
+
"grid_auto_flow": null,
|
316 |
+
"grid_auto_rows": null,
|
317 |
+
"grid_column": null,
|
318 |
+
"grid_gap": null,
|
319 |
+
"grid_row": null,
|
320 |
+
"grid_template_areas": null,
|
321 |
+
"grid_template_columns": null,
|
322 |
+
"grid_template_rows": null,
|
323 |
+
"height": null,
|
324 |
+
"justify_content": null,
|
325 |
+
"justify_items": null,
|
326 |
+
"left": null,
|
327 |
+
"margin": null,
|
328 |
+
"max_height": null,
|
329 |
+
"max_width": null,
|
330 |
+
"min_height": null,
|
331 |
+
"min_width": null,
|
332 |
+
"object_fit": null,
|
333 |
+
"object_position": null,
|
334 |
+
"order": null,
|
335 |
+
"overflow": null,
|
336 |
+
"overflow_x": null,
|
337 |
+
"overflow_y": null,
|
338 |
+
"padding": null,
|
339 |
+
"right": null,
|
340 |
+
"top": null,
|
341 |
+
"visibility": null,
|
342 |
+
"width": null
|
343 |
+
}
|
344 |
+
},
|
345 |
+
"fc68d192c3194b60bcf160ed8a85d77a": {
|
346 |
+
"model_module": "@jupyter-widgets/controls",
|
347 |
+
"model_name": "DescriptionStyleModel",
|
348 |
+
"model_module_version": "1.5.0",
|
349 |
+
"state": {
|
350 |
+
"_model_module": "@jupyter-widgets/controls",
|
351 |
+
"_model_module_version": "1.5.0",
|
352 |
+
"_model_name": "DescriptionStyleModel",
|
353 |
+
"_view_count": null,
|
354 |
+
"_view_module": "@jupyter-widgets/base",
|
355 |
+
"_view_module_version": "1.2.0",
|
356 |
+
"_view_name": "StyleView",
|
357 |
+
"description_width": ""
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
+
}
|
362 |
+
},
|
363 |
+
"cells": [
|
364 |
+
{
|
365 |
+
"cell_type": "code",
|
366 |
+
"execution_count": 1,
|
367 |
+
"metadata": {
|
368 |
+
"colab": {
|
369 |
+
"base_uri": "https://localhost:8080/"
|
370 |
+
},
|
371 |
+
"id": "Z77GfQWFZkz5",
|
372 |
+
"outputId": "3fe6d2a8-7d9d-459c-cc58-c37888f03ead"
|
373 |
+
},
|
374 |
+
"outputs": [
|
375 |
+
{
|
376 |
+
"output_type": "stream",
|
377 |
+
"name": "stdout",
|
378 |
+
"text": [
|
379 |
+
"\u001b[K |████████████████████████████████| 720 kB 5.3 MB/s \n",
|
380 |
+
"\u001b[K |████████████████████████████████| 1.2 MB 35.1 MB/s \n",
|
381 |
+
"\u001b[K |████████████████████████████████| 189 kB 16.1 MB/s \n",
|
382 |
+
"\u001b[K |████████████████████████████████| 48 kB 607 kB/s \n",
|
383 |
+
"\u001b[K |████████████████████████████████| 55 kB 3.5 MB/s \n",
|
384 |
+
"\u001b[K |████████████████████████████████| 51 kB 269 kB/s \n",
|
385 |
+
"\u001b[K |████████████████████████████████| 561 kB 40.6 MB/s \n",
|
386 |
+
"\u001b[K |████████████████████████████████| 130 kB 42.1 MB/s \n",
|
387 |
+
"\u001b[?25hCollecting fastai==2.5\n",
|
388 |
+
" Downloading fastai-2.5.0-py3-none-any.whl (188 kB)\n",
|
389 |
+
"\u001b[K |████████████████████████████████| 188 kB 5.3 MB/s \n",
|
390 |
+
"\u001b[?25hRequirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (1.0.2)\n",
|
391 |
+
"Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (3.13)\n",
|
392 |
+
"Requirement already satisfied: spacy<4 in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (2.2.4)\n",
|
393 |
+
"Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (1.3.5)\n",
|
394 |
+
"Requirement already satisfied: fastprogress>=0.2.4 in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (1.0.2)\n",
|
395 |
+
"Requirement already satisfied: pillow>6.0.0 in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (7.1.2)\n",
|
396 |
+
"Requirement already satisfied: fastdownload in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (0.0.5)\n",
|
397 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (2.23.0)\n",
|
398 |
+
"Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (3.2.2)\n",
|
399 |
+
"Requirement already satisfied: fastcore<1.4,>=1.3.8 in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (1.3.29)\n",
|
400 |
+
"Collecting torch<1.10,>=1.7.0\n",
|
401 |
+
" Downloading torch-1.9.1-cp37-cp37m-manylinux1_x86_64.whl (831.4 MB)\n",
|
402 |
+
"\u001b[K |████████████████████████████████| 831.4 MB 6.9 kB/s \n",
|
403 |
+
"\u001b[?25hRequirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (1.4.1)\n",
|
404 |
+
"Requirement already satisfied: torchvision>=0.8.2 in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (0.11.1+cu111)\n",
|
405 |
+
"Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (21.3)\n",
|
406 |
+
"Requirement already satisfied: pip in /usr/local/lib/python3.7/dist-packages (from fastai==2.5) (21.1.3)\n",
|
407 |
+
"Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (0.9.0)\n",
|
408 |
+
"Requirement already satisfied: blis<0.5.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (0.4.1)\n",
|
409 |
+
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (2.0.6)\n",
|
410 |
+
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (3.0.6)\n",
|
411 |
+
"Requirement already satisfied: plac<1.2.0,>=0.9.6 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (1.1.3)\n",
|
412 |
+
"Requirement already satisfied: srsly<1.1.0,>=1.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (1.0.5)\n",
|
413 |
+
"Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (57.4.0)\n",
|
414 |
+
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (1.0.6)\n",
|
415 |
+
"Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (1.0.0)\n",
|
416 |
+
"Requirement already satisfied: thinc==7.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (7.4.0)\n",
|
417 |
+
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (4.63.0)\n",
|
418 |
+
"Requirement already satisfied: numpy>=1.15.0 in /usr/local/lib/python3.7/dist-packages (from spacy<4->fastai==2.5) (1.21.5)\n",
|
419 |
+
"Requirement already satisfied: importlib-metadata>=0.20 in /usr/local/lib/python3.7/dist-packages (from catalogue<1.1.0,>=0.0.7->spacy<4->fastai==2.5) (4.11.3)\n",
|
420 |
+
"Requirement already satisfied: typing-extensions>=3.6.4 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20->catalogue<1.1.0,>=0.0.7->spacy<4->fastai==2.5) (3.10.0.2)\n",
|
421 |
+
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20->catalogue<1.1.0,>=0.0.7->spacy<4->fastai==2.5) (3.7.0)\n",
|
422 |
+
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->fastai==2.5) (1.24.3)\n",
|
423 |
+
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->fastai==2.5) (2.10)\n",
|
424 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->fastai==2.5) (2021.10.8)\n",
|
425 |
+
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->fastai==2.5) (3.0.4)\n",
|
426 |
+
"Collecting torchvision>=0.8.2\n",
|
427 |
+
" Downloading torchvision-0.12.0-cp37-cp37m-manylinux1_x86_64.whl (21.0 MB)\n",
|
428 |
+
"\u001b[K |████████████████████████████████| 21.0 MB 1.4 MB/s \n",
|
429 |
+
"\u001b[?25h Downloading torchvision-0.11.3-cp37-cp37m-manylinux1_x86_64.whl (23.2 MB)\n",
|
430 |
+
"\u001b[K |████████���███████████████████████| 23.2 MB 2.6 MB/s \n",
|
431 |
+
"\u001b[?25h Downloading torchvision-0.11.2-cp37-cp37m-manylinux1_x86_64.whl (23.3 MB)\n",
|
432 |
+
"\u001b[K |████████████████████████████████| 23.3 MB 1.6 MB/s \n",
|
433 |
+
"\u001b[?25h Downloading torchvision-0.11.1-cp37-cp37m-manylinux1_x86_64.whl (23.3 MB)\n",
|
434 |
+
"\u001b[K |████████████████████████████████| 23.3 MB 10.0 MB/s \n",
|
435 |
+
"\u001b[?25h Downloading torchvision-0.10.1-cp37-cp37m-manylinux1_x86_64.whl (22.1 MB)\n",
|
436 |
+
"\u001b[K |████████████████████████████████| 22.1 MB 12.3 MB/s \n",
|
437 |
+
"\u001b[?25hRequirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->fastai==2.5) (2.8.2)\n",
|
438 |
+
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->fastai==2.5) (0.11.0)\n",
|
439 |
+
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->fastai==2.5) (1.4.0)\n",
|
440 |
+
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->fastai==2.5) (3.0.7)\n",
|
441 |
+
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib->fastai==2.5) (1.15.0)\n",
|
442 |
+
"Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->fastai==2.5) (2018.9)\n",
|
443 |
+
"Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->fastai==2.5) (3.1.0)\n",
|
444 |
+
"Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->fastai==2.5) (1.1.0)\n",
|
445 |
+
"Installing collected packages: torch, torchvision, fastai\n",
|
446 |
+
" Attempting uninstall: torch\n",
|
447 |
+
" Found existing installation: torch 1.10.0+cu111\n",
|
448 |
+
" Uninstalling torch-1.10.0+cu111:\n",
|
449 |
+
" Successfully uninstalled torch-1.10.0+cu111\n",
|
450 |
+
" Attempting uninstall: torchvision\n",
|
451 |
+
" Found existing installation: torchvision 0.11.1+cu111\n",
|
452 |
+
" Uninstalling torchvision-0.11.1+cu111:\n",
|
453 |
+
" Successfully uninstalled torchvision-0.11.1+cu111\n",
|
454 |
+
" Attempting uninstall: fastai\n",
|
455 |
+
" Found existing installation: fastai 2.5.3\n",
|
456 |
+
" Uninstalling fastai-2.5.3:\n",
|
457 |
+
" Successfully uninstalled fastai-2.5.3\n",
|
458 |
+
"\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",
|
459 |
+
"torchtext 0.11.0 requires torch==1.10.0, but you have torch 1.9.1 which is incompatible.\n",
|
460 |
+
"torchaudio 0.10.0+cu111 requires torch==1.10.0, but you have torch 1.9.1 which is incompatible.\u001b[0m\n",
|
461 |
+
"Successfully installed fastai-2.5.0 torch-1.9.1 torchvision-0.10.1\n",
|
462 |
+
"Mounted at /content/gdrive\n"
|
463 |
+
]
|
464 |
+
}
|
465 |
+
],
|
466 |
+
"source": [
|
467 |
+
"!pip install -Uqq fastbook\n",
|
468 |
+
"!pip install fastai==2.5\n",
|
469 |
+
"import fastbook\n",
|
470 |
+
"fastbook.setup_book()\n",
|
471 |
+
"\n",
|
472 |
+
"from fastbook import *\n",
|
473 |
+
"from fastai.vision.widgets import *"
|
474 |
+
]
|
475 |
+
},
|
476 |
+
{
|
477 |
+
"cell_type": "code",
|
478 |
+
"source": [
|
479 |
+
"path = Path('/content/gdrive/My Drive/caballos')"
|
480 |
+
],
|
481 |
+
"metadata": {
|
482 |
+
"id": "HP3JCf-sZqQt"
|
483 |
+
},
|
484 |
+
"execution_count": 2,
|
485 |
+
"outputs": []
|
486 |
+
},
|
487 |
+
{
|
488 |
+
"cell_type": "code",
|
489 |
+
"source": [
|
490 |
+
"modelo = DataBlock(\n",
|
491 |
+
" blocks=(ImageBlock, CategoryBlock), \n",
|
492 |
+
" get_items=get_image_files, \n",
|
493 |
+
" splitter=RandomSplitter(valid_pct=0.2, seed=42),\n",
|
494 |
+
" get_y=parent_label,\n",
|
495 |
+
" item_tfms=RandomResizedCrop(224, min_scale=0.5),\n",
|
496 |
+
" batch_tfms=aug_transforms())\n",
|
497 |
+
"\n",
|
498 |
+
"dls = modelo.dataloaders(path)"
|
499 |
+
],
|
500 |
+
"metadata": {
|
501 |
+
"colab": {
|
502 |
+
"base_uri": "https://localhost:8080/"
|
503 |
+
},
|
504 |
+
"id": "Y_sgP8JKZtEF",
|
505 |
+
"outputId": "662106ef-b448-4b75-ee2f-ced407b07286"
|
506 |
+
},
|
507 |
+
"execution_count": 3,
|
508 |
+
"outputs": [
|
509 |
+
{
|
510 |
+
"output_type": "stream",
|
511 |
+
"name": "stderr",
|
512 |
+
"text": [
|
513 |
+
"/usr/local/lib/python3.7/dist-packages/torch/_tensor.py:1023: UserWarning: torch.solve is deprecated in favor of torch.linalg.solveand will be removed in a future PyTorch release.\n",
|
514 |
+
"torch.linalg.solve has its arguments reversed and does not return the LU factorization.\n",
|
515 |
+
"To get the LU factorization see torch.lu, which can be used with torch.lu_solve or torch.lu_unpack.\n",
|
516 |
+
"X = torch.solve(B, A).solution\n",
|
517 |
+
"should be replaced with\n",
|
518 |
+
"X = torch.linalg.solve(A, B) (Triggered internally at ../aten/src/ATen/native/BatchLinearAlgebra.cpp:760.)\n",
|
519 |
+
" ret = func(*args, **kwargs)\n"
|
520 |
+
]
|
521 |
+
}
|
522 |
+
]
|
523 |
+
},
|
524 |
+
{
|
525 |
+
"cell_type": "code",
|
526 |
+
"source": [
|
527 |
+
"learn = cnn_learner(dls, resnet18, metrics=error_rate)\n",
|
528 |
+
"learn.fine_tune(4)"
|
529 |
+
],
|
530 |
+
"metadata": {
|
531 |
+
"colab": {
|
532 |
+
"base_uri": "https://localhost:8080/",
|
533 |
+
"height": 288,
|
534 |
+
"referenced_widgets": [
|
535 |
+
"5f13d9666abd4744bffdea06bd5b81db",
|
536 |
+
"cc42f87c43db4ac483e3cf451a2ec7b5",
|
537 |
+
"eaaa7f22662b444d8b6065e6feb84acf",
|
538 |
+
"fa561ad40bc14cde8f3c8fa3e86e0174",
|
539 |
+
"8d7aea0c66524922ae5db50092e1a7c8",
|
540 |
+
"a642623cdd40432b809de48d93ae1e0c",
|
541 |
+
"962d6b4177104711a907ccdf733d8200",
|
542 |
+
"5f3b97e945354da7aab13a945541fe0c",
|
543 |
+
"a67ff5848e044d4883ad09aab3d8f4bf",
|
544 |
+
"3a213099ead44040bbc2df31b6801af8",
|
545 |
+
"fc68d192c3194b60bcf160ed8a85d77a"
|
546 |
+
]
|
547 |
+
},
|
548 |
+
"id": "c0z9H0xWZyml",
|
549 |
+
"outputId": "4b455f6b-17cf-4a03-c082-cf57c51fcd45"
|
550 |
+
},
|
551 |
+
"execution_count": 4,
|
552 |
+
"outputs": [
|
553 |
+
{
|
554 |
+
"output_type": "stream",
|
555 |
+
"name": "stderr",
|
556 |
+
"text": [
|
557 |
+
"Downloading: \"https://download.pytorch.org/models/resnet18-f37072fd.pth\" to /root/.cache/torch/hub/checkpoints/resnet18-f37072fd.pth\n"
|
558 |
+
]
|
559 |
+
},
|
560 |
+
{
|
561 |
+
"output_type": "display_data",
|
562 |
+
"data": {
|
563 |
+
"text/plain": [
|
564 |
+
" 0%| | 0.00/44.7M [00:00<?, ?B/s]"
|
565 |
+
],
|
566 |
+
"application/vnd.jupyter.widget-view+json": {
|
567 |
+
"version_major": 2,
|
568 |
+
"version_minor": 0,
|
569 |
+
"model_id": "5f13d9666abd4744bffdea06bd5b81db"
|
570 |
+
}
|
571 |
+
},
|
572 |
+
"metadata": {}
|
573 |
+
},
|
574 |
+
{
|
575 |
+
"output_type": "display_data",
|
576 |
+
"data": {
|
577 |
+
"text/plain": [
|
578 |
+
"<IPython.core.display.HTML object>"
|
579 |
+
],
|
580 |
+
"text/html": [
|
581 |
+
"\n",
|
582 |
+
"<style>\n",
|
583 |
+
" /* Turns off some styling */\n",
|
584 |
+
" progress {\n",
|
585 |
+
" /* gets rid of default border in Firefox and Opera. */\n",
|
586 |
+
" border: none;\n",
|
587 |
+
" /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
|
588 |
+
" background-size: auto;\n",
|
589 |
+
" }\n",
|
590 |
+
" .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
|
591 |
+
" background: #F44336;\n",
|
592 |
+
" }\n",
|
593 |
+
"</style>\n"
|
594 |
+
]
|
595 |
+
},
|
596 |
+
"metadata": {}
|
597 |
+
},
|
598 |
+
{
|
599 |
+
"output_type": "display_data",
|
600 |
+
"data": {
|
601 |
+
"text/plain": [
|
602 |
+
"<IPython.core.display.HTML object>"
|
603 |
+
],
|
604 |
+
"text/html": [
|
605 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
606 |
+
" <thead>\n",
|
607 |
+
" <tr style=\"text-align: left;\">\n",
|
608 |
+
" <th>epoch</th>\n",
|
609 |
+
" <th>train_loss</th>\n",
|
610 |
+
" <th>valid_loss</th>\n",
|
611 |
+
" <th>error_rate</th>\n",
|
612 |
+
" <th>time</th>\n",
|
613 |
+
" </tr>\n",
|
614 |
+
" </thead>\n",
|
615 |
+
" <tbody>\n",
|
616 |
+
" <tr>\n",
|
617 |
+
" <td>0</td>\n",
|
618 |
+
" <td>1.727824</td>\n",
|
619 |
+
" <td>1.942404</td>\n",
|
620 |
+
" <td>0.511628</td>\n",
|
621 |
+
" <td>00:54</td>\n",
|
622 |
+
" </tr>\n",
|
623 |
+
" </tbody>\n",
|
624 |
+
"</table>"
|
625 |
+
]
|
626 |
+
},
|
627 |
+
"metadata": {}
|
628 |
+
},
|
629 |
+
{
|
630 |
+
"output_type": "display_data",
|
631 |
+
"data": {
|
632 |
+
"text/plain": [
|
633 |
+
"<IPython.core.display.HTML object>"
|
634 |
+
],
|
635 |
+
"text/html": [
|
636 |
+
"\n",
|
637 |
+
"<style>\n",
|
638 |
+
" /* Turns off some styling */\n",
|
639 |
+
" progress {\n",
|
640 |
+
" /* gets rid of default border in Firefox and Opera. */\n",
|
641 |
+
" border: none;\n",
|
642 |
+
" /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
|
643 |
+
" background-size: auto;\n",
|
644 |
+
" }\n",
|
645 |
+
" .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
|
646 |
+
" background: #F44336;\n",
|
647 |
+
" }\n",
|
648 |
+
"</style>\n"
|
649 |
+
]
|
650 |
+
},
|
651 |
+
"metadata": {}
|
652 |
+
},
|
653 |
+
{
|
654 |
+
"output_type": "display_data",
|
655 |
+
"data": {
|
656 |
+
"text/plain": [
|
657 |
+
"<IPython.core.display.HTML object>"
|
658 |
+
],
|
659 |
+
"text/html": [
|
660 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
661 |
+
" <thead>\n",
|
662 |
+
" <tr style=\"text-align: left;\">\n",
|
663 |
+
" <th>epoch</th>\n",
|
664 |
+
" <th>train_loss</th>\n",
|
665 |
+
" <th>valid_loss</th>\n",
|
666 |
+
" <th>error_rate</th>\n",
|
667 |
+
" <th>time</th>\n",
|
668 |
+
" </tr>\n",
|
669 |
+
" </thead>\n",
|
670 |
+
" <tbody>\n",
|
671 |
+
" <tr>\n",
|
672 |
+
" <td>0</td>\n",
|
673 |
+
" <td>1.136568</td>\n",
|
674 |
+
" <td>0.820967</td>\n",
|
675 |
+
" <td>0.325581</td>\n",
|
676 |
+
" <td>00:44</td>\n",
|
677 |
+
" </tr>\n",
|
678 |
+
" <tr>\n",
|
679 |
+
" <td>1</td>\n",
|
680 |
+
" <td>0.841547</td>\n",
|
681 |
+
" <td>0.150323</td>\n",
|
682 |
+
" <td>0.023256</td>\n",
|
683 |
+
" <td>00:44</td>\n",
|
684 |
+
" </tr>\n",
|
685 |
+
" <tr>\n",
|
686 |
+
" <td>2</td>\n",
|
687 |
+
" <td>0.618603</td>\n",
|
688 |
+
" <td>0.045600</td>\n",
|
689 |
+
" <td>0.000000</td>\n",
|
690 |
+
" <td>00:44</td>\n",
|
691 |
+
" </tr>\n",
|
692 |
+
" <tr>\n",
|
693 |
+
" <td>3</td>\n",
|
694 |
+
" <td>0.482615</td>\n",
|
695 |
+
" <td>0.037267</td>\n",
|
696 |
+
" <td>0.000000</td>\n",
|
697 |
+
" <td>00:44</td>\n",
|
698 |
+
" </tr>\n",
|
699 |
+
" </tbody>\n",
|
700 |
+
"</table>"
|
701 |
+
]
|
702 |
+
},
|
703 |
+
"metadata": {}
|
704 |
+
}
|
705 |
+
]
|
706 |
+
}
|
707 |
+
]
|
708 |
+
}
|