forked from fastai/fastai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vision.learner.html
577 lines (422 loc) · 61.1 KB
/
vision.learner.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
---
title: vision.learner
keywords: fastai
sidebar: home_sidebar
summary: "`Learner` support for computer vision"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: docs_src/vision.learner.ipynb
# instructions: https://docs.fast.ai/gen_doc_main.html
-->
<div class="container" id="notebook-container">
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Computer-Vision-Learner">Computer Vision Learner<a class="anchor-link" href="#Computer-Vision-Learner">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><a href="/vision.learner.html#vision.learner"><code>vision.learner</code></a> is the module that defines the <a href="/vision.learner.html#cnn_learner"><code>cnn_learner</code></a> method, to easily get a model suitable for transfer learning.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Transfer-learning">Transfer learning<a class="anchor-link" href="#Transfer-learning">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Transfer learning is a technique where you use a model trained on a very large dataset (usually <a href="http://image-net.org/">ImageNet</a> in computer vision) and then adapt it to your own dataset. The idea is that it has learned to recognize many features on all of this data, and that you will benefit from this knowledge, especially if your dataset is small, compared to starting from a randomly initialized model. It has been proved in <a href="https://arxiv.org/abs/1805.08974">this article</a> on a wide range of tasks that transfer learning nearly always give better results.</p>
<p>In practice, you need to change the last part of your model to be adapted to your own number of classes. Most convolutional models end with a few linear layers (a part we will call the head). The last convolutional layer will have analyzed features in the image that went through the model, and the job of the head is to convert those in predictions for each of our classes. In transfer learning we will keep all the convolutional layers (called the body or the backbone of the model) with their weights pretrained on ImageNet but will define a new head initialized randomly.</p>
<p>Then we will train the model we obtain in two phases: first we freeze the body weights and only train the head (to convert those analyzed features into predictions for our own data), then we unfreeze the layers of the backbone (gradually if necessary) and fine-tune the whole model (possibly using differential learning rates).</p>
<p>The <a href="/vision.learner.html#cnn_learner"><code>cnn_learner</code></a> factory method helps you to automatically get a pretrained model from a given architecture with a custom head that is suitable for your data.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="cnn_learner" class="doc_header"><code>cnn_learner</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L91" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#cnn_learner-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>cnn_learner</code>(<strong><code>data</code></strong>:<a href="/basic_data.html#DataBunch"><code>DataBunch</code></a>, <strong><code>base_arch</code></strong>:<code>Callable</code>, <strong><code>cut</code></strong>:<code>Union</code>[<code>int</code>, <code>Callable</code>]=<strong><em><code>None</code></em></strong>, <strong><code>pretrained</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>lin_ftrs</code></strong>:<code>Optional</code>[<code>Collection</code>[<code>int</code>]]=<strong><em><code>None</code></em></strong>, <strong><code>ps</code></strong>:<code>Floats</code>=<strong><em><code>0.5</code></em></strong>, <strong><code>custom_head</code></strong>:<code>Optional</code>[<a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module"><code>Module</code></a>]=<strong><em><code>None</code></em></strong>, <strong><code>split_on</code></strong>:<code>Union</code>[<code>Callable</code>, <code>Collection</code>[<code>ModuleList</code>], <code>NoneType</code>]=<strong><em><code>None</code></em></strong>, <strong><code>bn_final</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>init</code></strong>=<strong><em><code>'kaiming_normal_'</code></em></strong>, <strong><code>concat_pool</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong>**<code>kwargs</code></strong>:<code>Any</code>) → <a href="/basic_train.html#Learner"><code>Learner</code></a></p>
</blockquote>
<div class="collapse" id="cnn_learner-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#cnn_learner-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>cnn_learner</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Build convnet style learner.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This method creates a <a href="/basic_train.html#Learner"><code>Learner</code></a> object from the <a href="/vision.data.html#vision.data"><code>data</code></a> object and model inferred from it with the backbone given in <code>base_arch</code>. Specifically, it will cut the model defined by <code>arch</code> (randomly initialized if <code>pretrained</code> is False) at the last convolutional layer by default (or as defined in <code>cut</code>, see below) and add:</p>
<ul>
<li>an <a href="/layers.html#AdaptiveConcatPool2d"><code>AdaptiveConcatPool2d</code></a> layer,</li>
<li>a <a href="/layers.html#Flatten"><code>Flatten</code></a> layer,</li>
<li>blocks of [<a href="https://pytorch.org/docs/stable/nn.html#torch.nn.BatchNorm1d"><code>nn.BatchNorm1d</code></a>, <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Dropout"><code>nn.Dropout</code></a>, <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Linear"><code>nn.Linear</code></a>, <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.ReLU"><code>nn.ReLU</code></a>] layers.</li>
</ul>
<p>The blocks are defined by the <code>lin_ftrs</code> and <code>ps</code> arguments. Specifically, the first block will have a number of inputs inferred from the backbone <code>base_arch</code> and the last one will have a number of outputs equal to <code>data.c</code> (which contains the number of classes of the data) and the intermediate blocks have a number of inputs/outputs determined by <code>lin_ftrs</code> (of course a block has a number of inputs equal to the number of outputs of the previous block). The default is to have an intermediate hidden size of 512 (which makes two blocks <code>model_activation</code> -> 512 -> <code>n_classes</code>). If you pass a float then the final dropout layer will have the value <code>ps</code>, and the remaining will be <code>ps/2</code>. If you pass a list then the values are used for dropout probabilities directly.</p>
<p>Note that the very last block doesn't have a <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.ReLU"><code>nn.ReLU</code></a> activation, to allow you to use any final activation you want (generally included in the loss function in pytorch). Also, the backbone will be frozen if you choose <code>pretrained=True</code> (so only the head will train if you call <a href="/basic_train.html#fit"><code>fit</code></a>) so that you can immediately start phase one of training as described above.</p>
<p>Alternatively, you can define your own <code>custom_head</code> to put on top of the backbone. If you want to specify where to split <code>base_arch</code> you should so in the argument <code>cut</code> which can either be the index of a specific layer (the result will not include that layer) or a function that, when passed the model, will return the backbone you want.</p>
<p>The final model obtained by stacking the backbone and the head (custom or defined as we saw) is then separated in groups for gradual unfreezing or differential learning rates. You can specify how to split the backbone in groups with the optional argument <code>split_on</code> (should be a function that returns those groups when given the backbone).</p>
<p>The <code>kwargs</code> will be passed on to <a href="/basic_train.html#Learner"><code>Learner</code></a>, so you can put here anything that <a href="/basic_train.html#Learner"><code>Learner</code></a> will accept (<a href="/metrics.html#metrics"><code>metrics</code></a>, <code>loss_func</code>, <code>opt_func</code>...)</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">path</span> <span class="o">=</span> <span class="n">untar_data</span><span class="p">(</span><span class="n">URLs</span><span class="o">.</span><span class="n">MNIST_SAMPLE</span><span class="p">)</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">ImageDataBunch</span><span class="o">.</span><span class="n">from_folder</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">learner</span> <span class="o">=</span> <span class="n">cnn_learner</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">models</span><span class="o">.</span><span class="n">resnet18</span><span class="p">,</span> <span class="n">metrics</span><span class="o">=</span><span class="p">[</span><span class="n">accuracy</span><span class="p">])</span>
<span class="n">learner</span><span class="o">.</span><span class="n">fit_one_cycle</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mf">1e-3</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_html rendered_html output_subarea ">
<table border="1" class="dataframe">
<thead>
<tr style="text-align: left;">
<th>epoch</th>
<th>train_loss</th>
<th>valid_loss</th>
<th>accuracy</th>
<th>time</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>0.132899</td>
<td>0.069354</td>
<td>0.978901</td>
<td>00:06</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">learner</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="s1">'one_epoch'</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="unet_learner" class="doc_header"><code>unet_learner</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L109" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#unet_learner-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>unet_learner</code>(<strong><code>data</code></strong>:<a href="/basic_data.html#DataBunch"><code>DataBunch</code></a>, <strong><code>arch</code></strong>:<code>Callable</code>, <strong><code>pretrained</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>blur_final</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>norm_type</code></strong>:<code>Optional</code>[<a href="/layers.html#NormType"><code>NormType</code></a>]=<strong><em><code>'NormType'</code></em></strong>, <strong><code>split_on</code></strong>:<code>Union</code>[<code>Callable</code>, <code>Collection</code>[<code>ModuleList</code>], <code>NoneType</code>]=<strong><em><code>None</code></em></strong>, <strong><code>blur</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>self_attention</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>y_range</code></strong>:<code>OptRange</code>=<strong><em><code>None</code></em></strong>, <strong><code>last_cross</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>bottle</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>cut</code></strong>:<code>Union</code>[<code>int</code>, <code>Callable</code>]=<strong><em><code>None</code></em></strong>, <strong>**<code>learn_kwargs</code></strong>:<code>Any</code>) → <a href="/basic_train.html#Learner"><code>Learner</code></a></p>
</blockquote>
<div class="collapse" id="unet_learner-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#unet_learner-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>unet_learner</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Build Unet learner from <code>data</code> and <code>arch</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This time the model will be a <a href="/vision.models.unet.html#DynamicUnet"><code>DynamicUnet</code></a> with an encoder based on <code>arch</code> (maybe <code>pretrained</code>) that is cut depending on <code>split_on</code>. <code>blur_final</code>, <code>norm_type</code>, <code>blur</code>, <code>self_attention</code>, <code>y_range</code>, <code>last_cross</code> and <code>bottle</code> are passed to unet constructor, the <code>kwargs</code> are passed to the initialization of the <a href="/basic_train.html#Learner"><code>Learner</code></a>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<div markdown="span" class="alert alert-danger" role="alert"><i class="fa fa-danger-circle"></i> <b>Warning: </b>The models created with this function won't work with pytorch `nn.DataParallel`, you have to use distributed training instead!</div>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="Get-predictions">Get predictions<a class="anchor-link" href="#Get-predictions">¶</a></h3>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Once you've actually trained your model, you may want to use it on a single image. This is done by using the following method.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="Learner.predict" class="doc_header"><code>predict</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L363" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Learner-predict-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>predict</code>(<strong><code>item</code></strong>:<a href="/core.html#ItemBase"><code>ItemBase</code></a>, <strong><code>return_x</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>batch_first</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>with_dropout</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong>**<code>kwargs</code></strong>)</p>
</blockquote>
<div class="collapse" id="Learner-predict-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Learner-predict-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>predict</code>:</p><ul><li><code>pytest -sv tests/test_vision_train.py::test_models_meta</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L89" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_vision_train.py::test_preds</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L63" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Return predicted class, label and probabilities for <code>item</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">img</span> <span class="o">=</span> <span class="n">learner</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">train_ds</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
<span class="n">learner</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">img</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_text output_subarea output_execute_result">
<pre>(Category 3, tensor(0), tensor([0.6472, 0.3528]))</pre>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Here the predict class for our image is '3', which corresponds to a label of 0. The probabilities the model found for each class are 99.65% and 0.35% respectively, so its confidence is pretty high.</p>
<p>Note that if you want to load your trained model and use it on inference mode with the previous function, you should export your <a href="/basic_train.html#Learner"><code>Learner</code></a>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">learner</span><span class="o">.</span><span class="n">export</span><span class="p">()</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>And then you can load it with an empty data object that has the same internal state like this:</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">learn</span> <span class="o">=</span> <span class="n">load_learner</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="Customize-your-model">Customize your model<a class="anchor-link" href="#Customize-your-model">¶</a></h3>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>You can customize <a href="/vision.learner.html#cnn_learner"><code>cnn_learner</code></a> for your own model's default <code>cut</code> and <code>split_on</code> functions by adding them to the dictionary <code>model_meta</code>. The key should be your model and the value should be a dictionary with the keys <code>cut</code> and <code>split_on</code> (see the source code for examples). The constructor will call <a href="/vision.learner.html#create_body"><code>create_body</code></a> and <a href="/vision.learner.html#create_head"><code>create_head</code></a> for you based on <code>cut</code>; you can also call them yourself, which is particularly useful for testing.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="create_body" class="doc_header"><code>create_body</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L54" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#create_body-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>create_body</code>(<strong><code>arch</code></strong>:<code>Callable</code>, <strong><code>pretrained</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>cut</code></strong>:<code>Union</code>[<code>int</code>, <code>Callable</code>, <code>NoneType</code>]=<strong><em><code>None</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="create_body-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#create_body-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>create_body</code>:</p><ul><li><code>pytest -sv tests/test_vision_learner.py::test_create_body</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_learner.py#L16" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Cut off the body of a typically pretrained <code>model</code> at <code>cut</code> (int) or cut the model as specified by <code>cut(model)</code> (function).</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="create_head" class="doc_header"><code>create_head</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L66" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#create_head-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>create_head</code>(<strong><code>nf</code></strong>:<code>int</code>, <strong><code>nc</code></strong>:<code>int</code>, <strong><code>lin_ftrs</code></strong>:<code>Optional</code>[<code>Collection</code>[<code>int</code>]]=<strong><em><code>None</code></em></strong>, <strong><code>ps</code></strong>:<code>Floats</code>=<strong><em><code>0.5</code></em></strong>, <strong><code>concat_pool</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>bn_final</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="create_head-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#create_head-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>create_head</code>:</p><ul><li><code>pytest -sv tests/test_vision_learner.py::test_create_head</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_learner.py#L39" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Model head that takes <code>nf</code> features, runs through <code>lin_ftrs</code>, and ends with <code>nc</code> classes. <code>ps</code> is the probability of the dropouts, as documented above in <a href="/vision.learner.html#cnn_learner"><code>cnn_learner</code></a>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h3 id="ClassificationInterpretation" class="doc_header"><code>class</code> <code>ClassificationInterpretation</code><a href="https://github.com/fastai/fastai/blob/master/fastai/train.py#L163" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#ClassificationInterpretation-pytest" style="float:right; padding-right:10px">[test]</a></h3><blockquote><p><code>ClassificationInterpretation</code>(<strong><code>learn</code></strong>:<a href="/basic_train.html#Learner"><code>Learner</code></a>, <strong><code>preds</code></strong>:<code>Tensor</code>, <strong><code>y_true</code></strong>:<code>Tensor</code>, <strong><code>losses</code></strong>:<code>Tensor</code>, <strong><code>ds_type</code></strong>:<a href="/basic_data.html#DatasetType"><code>DatasetType</code></a>=<strong><em><code><DatasetType.Valid: 2></code></em></strong>) :: <a href="/train.html#Interpretation"><code>Interpretation</code></a></p>
</blockquote>
<div class="collapse" id="ClassificationInterpretation-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#ClassificationInterpretation-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>ClassificationInterpretation</code>:</p><ul><li><code>pytest -sv tests/test_vision_train.py::test_ClassificationInterpretation</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L95" class="source_link" style="float:right">[source]</a></li></ul><p>Some other tests where <code>ClassificationInterpretation</code> is used:</p><ul><li><code>pytest -sv tests/test_tabular_train.py::test_confusion_tabular</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_tabular_train.py#L84" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_vision_train.py::test_interp</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L72" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Interpretation methods for classification models.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This provides a confusion matrix and visualization of the most incorrect images. Pass in your <a href="/vision.data.html#vision.data"><code>data</code></a>, calculated <code>preds</code>, actual <code>y</code>, and your <code>losses</code>, and then use the methods below to view the model interpretation results. For instance:</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">learn</span> <span class="o">=</span> <span class="n">cnn_learner</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">models</span><span class="o">.</span><span class="n">resnet18</span><span class="p">)</span>
<span class="n">learn</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="n">preds</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">losses</span> <span class="o">=</span> <span class="n">learn</span><span class="o">.</span><span class="n">get_preds</span><span class="p">(</span><span class="n">with_loss</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">interp</span> <span class="o">=</span> <span class="n">ClassificationInterpretation</span><span class="p">(</span><span class="n">learn</span><span class="p">,</span> <span class="n">preds</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">losses</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>The following factory method gives a more convenient way to create an instance of this class:</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="_cl_int_from_learner" class="doc_header"><code>from_learner</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L127" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#_cl_int_from_learner-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>from_learner</code>(<strong><code>learn</code></strong>:<a href="/basic_train.html#Learner"><code>Learner</code></a>, <strong><code>ds_type</code></strong>:<a href="/basic_data.html#DatasetType"><code>DatasetType</code></a>=<strong><em><code><DatasetType.Valid: 2></code></em></strong>, <strong><code>tta</code></strong>=<strong><em><code>False</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="_cl_int_from_learner-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#_cl_int_from_learner-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>_cl_int_from_learner</code>:</p><ul><li><code>pytest -sv tests/test_vision_train.py::test_interp</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L72" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Create an instance of <a href="/train.html#ClassificationInterpretation"><code>ClassificationInterpretation</code></a>. <code>tta</code> indicates if we want to use Test Time Augmentation.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>You can also use a shortcut <code>learn.interpret()</code> to do the same.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="_learner_interpret" class="doc_header"><code>interpret</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L215" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#_learner_interpret-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>interpret</code>(<strong><code>learn</code></strong>:<a href="/basic_train.html#Learner"><code>Learner</code></a>, <strong><code>ds_type</code></strong>:<a href="/basic_data.html#DatasetType"><code>DatasetType</code></a>=<strong><em><code><DatasetType.Valid: 2></code></em></strong>, <strong><code>tta</code></strong>=<strong><em><code>False</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="_learner_interpret-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#_learner_interpret-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>_learner_interpret</code>:</p><ul><li><code>pytest -sv tests/test_vision_train.py::test_interp_shortcut</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L78" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Create a <a href="/train.html#ClassificationInterpretation"><code>ClassificationInterpretation</code></a> object from <code>learner</code> on <code>ds_type</code> with <code>tta</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Note that this shortcut is a <a href="/basic_train.html#Learner"><code>Learner</code></a> object/class method that can be called as: <code>learn.interpret()</code>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="_cl_int_plot_top_losses" class="doc_header"><code>plot_top_losses</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L137" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#_cl_int_plot_top_losses-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot_top_losses</code>(<strong><code>k</code></strong>, <strong><code>largest</code></strong>=<strong><em><code>True</code></em></strong>, <strong><code>figsize</code></strong>=<strong><em><code>(12, 12)</code></em></strong>, <strong><code>heatmap</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>, <strong><code>heatmap_thresh</code></strong>:<code>int</code>=<strong><em><code>16</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
</blockquote>
<div class="collapse" id="_cl_int_plot_top_losses-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#_cl_int_plot_top_losses-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>_cl_int_plot_top_losses</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Show images in <code>top_losses</code> along with their prediction, actual, loss, and probability of actual class.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>The <code>k</code> items are arranged as a square, so it will look best if <code>k</code> is a square number (4, 9, 16, etc). The title of each image shows: prediction, actual, loss, probability of actual class. When <code>heatmap</code> is True (by default it's True) , Grad-CAM heatmaps (<a href="http://openaccess.thecvf.com/content_ICCV_2017/papers/Selvaraju_Grad-CAM_Visual_Explanations_ICCV_2017_paper.pdf">http://openaccess.thecvf.com/content_ICCV_2017/papers/Selvaraju_Grad-CAM_Visual_Explanations_ICCV_2017_paper.pdf</a>) are overlaid on each image. <code>plot_top_losses</code> should be used with single-labeled datasets. See <code>plot_multi_top_losses</code> below for a version capable of handling multi-labeled datasets.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">interp</span><span class="o">.</span><span class="n">plot_top_losses</span><span class="p">(</span><span class="mi">9</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="mi">7</span><span class="p">))</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_png output_subarea ">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaUAAAHOCAYAAAA44RY3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl0XNWdJ/DvT5IlWbLlBe+rbOMd29jYmGDAJpjFhNOETsIkMB2YQBLSzSQdupPuk+4kdJIhHbqTnmmmmYR0T9hCCJNOkxgCZjXYGAzeLe+LvO+bZEmWZEl3/ni32u93XfWqSiqpbpW+n3Pq2L/3bt13X72r+tV79y1ijAEREZEPCrLdACIiohgmJSIi8gaTEhEReYNJiYiIvMGkRERE3mBSIiIibzAp5RERWSAixr4W2GkPx6ZlaBl7bH1PZqK+fJTqZy4iT9pye7qoad7IZD8SkXtD/b4ynXLxtgH7eHYxKeW/AwBW2ldK4iW3kLW2rl2Za2LcNsy0y/9UButM6curM4nI10WkVUQGZWP5rs74nD12HBf+Fpoiyl3Ux5mouk5RthtAF4hIsTGmOZN1GmP+FcC/ZrC+OzJVVxKfBNAI4NUuWl5X+SSAFcaYYyKS7bYAGfycO6P/ZpIx5mUAL6dQrqv6OMXBPaVOEPpV9bSIfF9EjopIvYg8JyJ9nDLPiMiPReQE7N6MiBSLyLdFZJuINInISfveEc5yHhCRfSLSICKLAQyP05a4h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saMzm+Md7ikREZE3mJSIiMgbTEpEROQNjil5YO3aNSoeO3aMiqdMmaLiDz/Uz1Oh9nHHkNyxvH799HVK7nNt3HvjrVq1WsW8hyHFU1HRW8Xuc7RcbW2tndkc73BPiYiIvMGkRERE3mBSIiIib3BMyUO7du1W8RVXXKHi1av12EVrq743FqWmsrJSxe4YkuvcuXMqdp+PRJQJ7nO7tm3bnqWWZAf3lIiIyBtMSkRE5A0mJSIi8gbHlDy0e7ceU5ozZ06WWkJhy5a9m7wQUQe518P1799fxTU1Z7qyOV2Oe0pEROQNJiUiIvIGkxIREXmDY0oeampqynYT8lK/fvrY/KxZsxKUDLjPQ9q3b3/G20SUTHFxcbab0KW4p0RERN5gUiIiIm8wKRERkTc4puSh0aNHZ7sJeWncuHEqLisrS1AysGPHDmeKiVuOKB01NbUq3rRpk4qnTp2q4quvvlrF7vPVFi9erOJcf44X95SIiMgbTEpEROQNJiUiIvIGx5Q8UFBQqOIZM6areP36dSpubW3t9Dblo5MnT6q4sbFRxbW1NSquqtrY6W2i7seYNhWvXbtWxe6YUlGR/po+ceKEitva8uv7gHtKRETkDSYlIiLyBpMSERF5g2NKWVBe3kvFs2fPVnFFRYWKd+7c5dTA62Xao7p6d2RMlA3nzjWo+Oc/fyJLLfED95SIiMgbTEpEROQNJiUiIvIGx5SyoL6+TsXvvLM0MiYi6i64p0RERN5gUiIiIm8wKRERkTeYlIiIyBtMSkRE5A0mJSIi8gaTEhEReaOLr1Mq6N43daIUsZ9QKthP8hH3lIiIyBtiDO84TUREfuCeEhEReYNJiYiIvMGkRERE3mBSIiIibzApERGRN5iUiIjIG0xKRETkDSYlIiLyBpMSERF5g0mJiIi8waRERETeYFIiIiJvMCkREZE3mJSIiMgbTEpEROQNJiUiIvIGkxIREXmDSYmIiLzBpERERN5gUiIiIm8wKRERkTeYlIiIyBtMSkRE5I3/D01wovOIKRZ9AAAAAElFTkSuQmCC
"
>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="_cl_int_plot_multi_top_losses" class="doc_header"><code>plot_multi_top_losses</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/learner.py#L169" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#_cl_int_plot_multi_top_losses-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot_multi_top_losses</code>(<strong><code>samples</code></strong>:<code>int</code>=<strong><em><code>3</code></em></strong>, <strong><code>figsize</code></strong>:<code>Tuple</code>[<code>int</code>, <code>int</code>]=<strong><em><code>(8, 8)</code></em></strong>, <strong><code>save_misclassified</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="_cl_int_plot_multi_top_losses-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#_cl_int_plot_multi_top_losses-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>_cl_int_plot_multi_top_losses</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Show images in <code>top_losses</code> along with their prediction, actual, loss, and probability of predicted class in a multilabeled dataset.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Similar to <code>plot_top_losses()</code> but aimed at multi-labeled datasets. It plots misclassified samples sorted by their respective loss.
Since you can have multiple labels for a single sample, they can easily overlap in a grid plot. So it plots just one sample per row.<br>
Note that you can pass <code>save_misclassified=True</code> (by default it's <code>False</code>). In such case, the method will return a list containing the misclassified images which you can use to debug your model and/or tune its hyperparameters.</p>
</div>
</div>
</div>
</div>