forked from fastai/fastai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic_train.html
3346 lines (2395 loc) · 363 KB
/
basic_train.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
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: basic_train
keywords: fastai
sidebar: home_sidebar
summary: "Learner class and training loop"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: docs_src/basic_train.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="Basic-training-functionality">Basic training functionality<a class="anchor-link" href="#Basic-training-functionality">¶</a></h2>
</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">
<p><a href="/basic_train.html#basic_train"><code>basic_train</code></a> wraps together the data (in a <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> object) with a PyTorch model to define a <a href="/basic_train.html#Learner"><code>Learner</code></a> object. Here the basic training loop is defined for the <a href="/basic_train.html#fit"><code>fit</code></a> method. The <a href="/basic_train.html#Learner"><code>Learner</code></a> object is the entry point of most of the <a href="/callback.html#Callback"><code>Callback</code></a> objects that will customize this training loop in different ways. Some of the most commonly used customizations are available through the <a href="/train.html#train"><code>train</code></a> module, notably:</p>
<ul>
<li><a href="/train.html#lr_find"><code>Learner.lr_find</code></a> will launch an LR range test that will help you select a good learning rate.</li>
<li><a href="/train.html#fit_one_cycle"><code>Learner.fit_one_cycle</code></a> will launch a training using the 1cycle policy to help you train your model faster.</li>
<li><a href="/train.html#to_fp16"><code>Learner.to_fp16</code></a> will convert your model to half precision and help you launch a training in mixed precision.</li>
</ul>
</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 ">
<h2 id="Learner" class="doc_header"><code>class</code> <code>Learner</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L144" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Learner-pytest" style="float:right; padding-right:10px">[test]</a></h2><blockquote><p><code>Learner</code>(<strong><code>data</code></strong>:<a href="/basic_data.html#DataBunch"><code>DataBunch</code></a>, <strong><code>model</code></strong>:<a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module"><code>Module</code></a>, <strong><code>opt_func</code></strong>:<code>Callable</code>=<strong><em><code>'Adam'</code></em></strong>, <strong><code>loss_func</code></strong>:<code>Callable</code>=<strong><em><code>None</code></em></strong>, <strong><code>metrics</code></strong>:<code>Collection</code>[<code>Callable</code>]=<strong><em><code>None</code></em></strong>, <strong><code>true_wd</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>bn_wd</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>wd</code></strong>:<code>Floats</code>=<strong><em><code>0.01</code></em></strong>, <strong><code>train_bn</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>path</code></strong>:<code>str</code>=<strong><em><code>None</code></em></strong>, <strong><code>model_dir</code></strong>:<code>PathOrStr</code>=<strong><em><code>'models'</code></em></strong>, <strong><code>callback_fns</code></strong>:<code>Collection</code>[<code>Callable</code>]=<strong><em><code>None</code></em></strong>, <strong><code>callbacks</code></strong>:<code>Collection</code>[<a href="/callback.html#Callback"><code>Callback</code></a>]=<strong><em><code><factory></code></em></strong>, <strong><code>layer_groups</code></strong>:<code>ModuleList</code>=<strong><em><code>None</code></em></strong>, <strong><code>add_time</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>silent</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="Learner-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Learner-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>Learner</code>:</p><p>Some other tests where <code>Learner</code> is used:</p><ul><li><code>pytest -sv tests/test_basic_train.py::test_memory</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_basic_train.py#L213" 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>Trainer for <code>model</code> using <code>data</code> to minimize <code>loss_func</code> with optimizer <code>opt_func</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>The main purpose of <a href="/basic_train.html#Learner"><code>Learner</code></a> is to train <code>model</code> using <a href="/basic_train.html#Learner.fit"><code>Learner.fit</code></a>. After every epoch, all <em>metrics</em> will be printed and also made available to callbacks.</p>
<p>The default weight decay will be <code>wd</code>, which will be handled using the method from <a href="https://arxiv.org/abs/1711.05101">Fixing Weight Decay Regularization in Adam</a> if <code>true_wd</code> is set (otherwise it's L2 regularization). If <code>true_wd</code> is set it will affect all optimizers, not only Adam. If <code>bn_wd</code> is <code>False</code>, then weight decay will be removed from batchnorm layers, as recommended in <a href="https://arxiv.org/abs/1706.02677">Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour</a>. If <code>train_bn</code>, batchnorm layer learnable params are trained even for frozen layer groups.</p>
<p>To use <a href="#Discriminative-layer-training">discriminative layer training</a>, pass a list of <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module"><code>nn.Module</code></a> as <code>layer_groups</code>; each <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module"><code>nn.Module</code></a> will be used to customize the optimization of the corresponding layer group.</p>
<p>If <code>path</code> is provided, all the model files created will be saved in <code>path</code>/<code>model_dir</code>; if not, then they will be saved in <code>data.path</code>/<code>model_dir</code>.</p>
<p>You can pass a list of <a href="/callback.html#callback"><code>callback</code></a>s that you have already created, or (more commonly) simply pass a list of callback functions to <code>callback_fns</code> and each function will be called (passing <code>self</code>) on object initialization, with the results stored as callback objects. For a walk-through, see the <a href="/training.html">training overview</a> page. You may also want to use an <a href="applications.html">application</a> specific model. For example, if you are dealing with a vision dataset, here the MNIST, you might want to use the <a href="/vision.learner.html#cnn_learner"><code>cnn_learner</code></a> method:</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>
<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">metrics</span><span class="o">=</span><span class="n">accuracy</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="Model-fitting-methods">Model fitting methods<a class="anchor-link" href="#Model-fitting-methods">¶</a></h3>
</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="lr_find" class="doc_header"><code>lr_find</code><a href="https://github.com/fastai/fastai/blob/master/fastai/train.py#L24" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#lr_find-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>lr_find</code>(<strong><code>learn</code></strong>:<a href="/basic_train.html#Learner"><code>Learner</code></a>, <strong><code>start_lr</code></strong>:<code>Floats</code>=<strong><em><code>1e-07</code></em></strong>, <strong><code>end_lr</code></strong>:<code>Floats</code>=<strong><em><code>10</code></em></strong>, <strong><code>num_it</code></strong>:<code>int</code>=<strong><em><code>100</code></em></strong>, <strong><code>stop_div</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>wd</code></strong>:<code>float</code>=<strong><em><code>None</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="lr_find-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#lr_find-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>lr_find</code>:</p><ul><li><code>pytest -sv tests/test_train.py::test_lr_find</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_train.py#L16" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_vision_train.py::test_lrfind</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_train.py#L84" 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>Explore lr from <code>start_lr</code> to <code>end_lr</code> over <code>num_it</code> iterations in <code>learn</code>. If <code>stop_div</code>, stops when loss diverges.</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>Runs the learning rate finder defined in <a href="/callbacks.lr_finder.html#LRFinder"><code>LRFinder</code></a>, as discussed in <a href="https://arxiv.org/abs/1506.01186">Cyclical Learning Rates for Training Neural Networks</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">learn</span><span class="o">.</span><span class="n">lr_find</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 ">
</div>
</div>
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
<pre>LR Finder is complete, type {learner_name}.recorder.plot() to see the graph.
</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">learn</span><span class="o">.</span><span class="n">recorder</span><span class="o">.</span><span class="n">plot</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,iVBORw0KGgoAAAANSUhEUgAAAZgAAAEKCAYAAAAvlUMdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xd4lFX2wPHvSYcUCCT0FjAooUNA0bWiiA3ECnbX8rOuZdXV1RXFXXXtrmtZdMUuIpbVXRXBFXFVhCAE6b2EGnogZJLJnN8f8wbHkJAQ5s1MZs7neeZh5s59Z85lkpx5733vvaKqGGOMMcEWE+oAjDHGRCZLMMYYY1xhCcYYY4wrLMEYY4xxhSUYY4wxrrAEY4wxxhWWYIwxxrjC1QQjIkNFZLGILBORu6t4vqOIfCUic0Vkqoi0C3iuXETmOLdP3IzTGGNM8IlbEy1FJBZYApwCFAAzgVGquiCgzvvAv1X1dRE5CbhSVS91ntutqimuBGeMMcZ1cS6+9kBgmaquABCR8cBwYEFAnRzgNuf+18DHdX2zjIwM7dSpU10PN8aYqDRr1qwtqprpxmu7mWDaAmsDHhcAR1aqkw+cCzwLjABSRaS5qm4FkkQkD/ACj6rqAZNPp06dyMvLC1rwxhgTDURktVuv7eYYjFRRVrk/7g7geBGZDRwPrMOfUAA6qGoucBHwjIh02e8NRK4VkTwRySssLAxi6MYYYw6VmwmmAGgf8LgdsD6wgqquV9VzVLUvcK9TtrPiOeffFcBUoG/lN1DVsaqaq6q5mZmunOEZY4ypIzcTzEwgW0SyRCQBGAn86mowEckQkYoY7gFedcrTRSSxog5wDL8euzHGGBPmXEswquoFbgImAQuBCao6X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+PdPAUBEKpY1bwKsc+5f4eL7T8ffNQcwsqbKqroT/7bId4hIPP44NzvJ5USgo1O1CEgNOHQS8FtnfxBEpK2ItAhSG4ypkSUYE+kai0hBwO12/H+sc52B7wX4t1gAeAx4RES+A2JdjOlW4HYRmQG0BnbWdICqzsa/Mu5I/Bty5YpIHv6zmUVOna3Ad85lzY+r6pf4u+B+EJGfgYn8OgEZ4yq7TNmYeubsrrlXVVVERgKjVHV4TccZ09DYGIwx9a8/8Hfnyq8dhGgbamPcZmcwxhhjXGFjMMYYY1xhCcYYY4wrLMEYY4xxhSUYY4wxrrAEY4wxxhWWYIwxxrji/wFH8Glk1L+LKQAAAABJRU5ErkJggg==
"
>
</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="Learner.fit" class="doc_header"><code>fit</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L191" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Learner-fit-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>fit</code>(<strong><code>epochs</code></strong>:<code>int</code>, <strong><code>lr</code></strong>:<code>Union</code>[<code>float</code>, <code>Collection</code>[<code>float</code>], <code>slice</code>]=<strong><em><code>slice(None, 0.003, None)</code></em></strong>, <strong><code>wd</code></strong>:<code>Floats</code>=<strong><em><code>None</code></em></strong>, <strong><code>callbacks</code></strong>:<code>Collection</code>[<a href="/callback.html#Callback"><code>Callback</code></a>]=<strong><em><code>None</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="Learner-fit-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Learner-fit-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>fit</code>:</p><ul><li><code>pytest -sv tests/test_train.py::test_fit</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_train.py#L28" class="source_link" style="float:right">[source]</a></li></ul><p>Some other tests where <code>fit</code> is used:</p><ul><li><code>pytest -sv tests/test_basic_train.py::test_destroy</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_basic_train.py#L170" 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>Fit the model on this learner with <code>lr</code> learning rate, <code>wd</code> weight decay for <code>epochs</code> with <code>callbacks</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>Uses <a href="#Discriminative-layer-training">discriminative layer training</a> if multiple learning rates or weight decay values are passed. To control training behaviour, use the <a href="/callback.html#callback"><code>callback</code></a> system or one or more of the pre-defined <a href="/callbacks.html#callbacks"><code>callbacks</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">learn</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="mi">1</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>1</td>
<td>0.135343</td>
<td>0.083190</td>
<td>0.972031</td>
<td>00:05</td>
</tr>
</tbody>
</table>
</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="fit_one_cycle" class="doc_header"><code>fit_one_cycle</code><a href="https://github.com/fastai/fastai/blob/master/fastai/train.py#L14" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#fit_one_cycle-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>fit_one_cycle</code>(<strong><code>learn</code></strong>:<a href="/basic_train.html#Learner"><code>Learner</code></a>, <strong><code>cyc_len</code></strong>:<code>int</code>, <strong><code>max_lr</code></strong>:<code>Union</code>[<code>float</code>, <code>Collection</code>[<code>float</code>], <code>slice</code>]=<strong><em><code>slice(None, 0.003, None)</code></em></strong>, <strong><code>moms</code></strong>:<code>Point</code>=<strong><em><code>(0.95, 0.85)</code></em></strong>, <strong><code>div_factor</code></strong>:<code>float</code>=<strong><em><code>25.0</code></em></strong>, <strong><code>pct_start</code></strong>:<code>float</code>=<strong><em><code>0.3</code></em></strong>, <strong><code>final_div</code></strong>:<code>float</code>=<strong><em><code>None</code></em></strong>, <strong><code>wd</code></strong>:<code>float</code>=<strong><em><code>None</code></em></strong>, <strong><code>callbacks</code></strong>:<code>Optional</code>[<code>Collection</code>[<a href="/callback.html#Callback"><code>Callback</code></a>]]=<strong><em><code>None</code></em></strong>, <strong><code>tot_epochs</code></strong>:<code>int</code>=<strong><em><code>None</code></em></strong>, <strong><code>start_epoch</code></strong>:<code>int</code>=<strong><em><code>None</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="fit_one_cycle-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#fit_one_cycle-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>fit_one_cycle</code>:</p><ul><li><code>pytest -sv tests/test_train.py::test_fit_one_cycle</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_train.py#L36" class="source_link" style="float:right">[source]</a></li></ul><p>Some other tests where <code>fit_one_cycle</code> is used:</p><ul><li><code>pytest -sv tests/test_tabular_train.py::test_empty_cont</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_tabular_train.py#L71" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_text_train.py::test_qrnn_works_if_split_fn_provided</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_text_train.py#L73" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_text_train.py::test_qrnn_works_with_no_split</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_text_train.py#L61" 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>Fit a model following the 1cycle policy.</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>Use cycle length <code>cyc_len</code>, a per cycle maximal learning rate <code>max_lr</code>, momentum <code>moms</code>, division factor <code>div_factor</code>, weight decay <code>wd</code>, and optional callbacks <a href="/callbacks.html#callbacks"><code>callbacks</code></a>. Uses the <a href="/callbacks.one_cycle.html#OneCycleScheduler"><code>OneCycleScheduler</code></a> callback. Please refer to <a href="/callbacks.one_cycle.html#What-is-1cycle?">What is 1-cycle</a> for a conceptual background of 1-cycle training policy and more technical details on what do the method's arguments do.</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">fit_one_cycle</span><span class="p">(</span><span class="mi">1</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>1</td>
<td>0.075838</td>
<td>0.061869</td>
<td>0.979882</td>
<td>00:05</td>
</tr>
</tbody>
</table>
</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="See-results">See results<a class="anchor-link" href="#See-results">¶</a></h3>
</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 text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><code>predict</code> can be used to get a single prediction from the trained learner on one specific piece of data you are interested in.</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">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>
</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>(Image (3, 28, 28), <fastai.core.Category at 0x7fb0e0dee1d0>)</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>Each element of the dataset is a tuple, where the first element is the data itself, while the second element is the target label. So to get the data, we need to index one more time.</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">data</span> <span class="o">=</span> <span class="n">learn</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>
</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">data</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_png output_subarea output_execute_result">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAbBJREFUSInt1rGKwkAQBuBfuUJMRK0FQbYxoGBpLQimDAg+goVPIFrY29iYykoQfAEraxFDhBRW2lmJVqaV7Fxl0BPNrp42dwtTJOzOl1lmk4QAED44wp/E/sE/AubzebRaLXDOwTkHEWGxWMCyLP8e5xyNRkMYpUfRbrfJ87zAOB6PVKvVHuYCQF9BT2PbNvr9vn9dKpWgadrNPFVVwRh7vcKfwRijYrFI1Wr1qsL5fE6pVEokhxwIgDRNo9VqdQUWCgXR9eJQLBYj0zRpu9360G63o2w2S5FI5PfBwWBw0yyu61K32xXdTnGw0+nQ6XS626Wz2Uwoj/DBVxQF4fD96fF4XChP4LE4j2aziWQy6Sfu9XrI5XIwTRMAYFmWaCr5LgVAiqKQbdvv7dJzZDKZK8xxHEqn0+8BE4kELZdLH1uv18QYk8khB14eDcdxZDE50DAMOhwO5HkebTYbmW2UB3VdJ9d1/eoMw3iq2YRAVVVpNBr52GQyoWg0+h5Q13Uaj8c+NhwOqVKpPIsFg5cf4P1+T+Vy+RVM/NUGAPV6HdPpVGbJzQidy/zU+Phf2zcGKKJjocPzywAAAABJRU5ErkJggg==
"
>
</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">pred</span> <span class="o">=</span> <span class="n">learn</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="n">pred</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>(<fastai.core.Category at 0x7fb0e02f29b0>, tensor(0), tensor([0.5748, 0.4252]))</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 first two elements of the tuple are, respectively, the predicted class and label. Label here is essentially an internal representation of each class, since class name is a string and cannot be used in computation. To check what each label corresponds to, run:</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">data</span><span class="o">.</span><span class="n">classes</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>['3', '7']</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>So category 0 is 3 while category 1 is 7.</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">probs</span> <span class="o">=</span> <span class="n">pred</span><span class="p">[</span><span class="mi">2</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 last element in the tuple is the predicted probabilities. For a categorization dataset, the number of probabilities returned is the same as the number of classes; <code>probs[i]</code> is the probability that the <code>item</code> belongs to <code>learn.data.classes[i]</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">learn</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">valid_ds</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</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 output_execute_result">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAdJJREFUSIntVbGq4kAUvW9ZUZCQIqjBzlohhWAsLEQLwdZUNn6AkEbQD7AJthZWFnYWWgj+gKRIpRZiK1hpIYoY1BSZ86q12SUm8T2L5V04zcyZOffMvZf5ICLQG+PXO8V+BH8EfcVvN6RCoUC1Wo1yuRwlEgmaTqd0Op1ot9vRZDIhwzA8icIJqqrCsizYtg3GGGzbfoAxBsuysNlsIMuy4z1/8EEOg8/zPK3XaxqPx9Tv9x/roVCIKpUKxeNxKpVKJAgCzedzymQyrznUNA35fN4xY0mSHo7dOHz6pM8gSRIYY9B13RX/5S4tFosEgDqdjuszjhlxHAdRFBEMBv/a43ke+/0e2+0WHMe5cvh0LGazGUmSRIvFgo7HI41GI7rf70REpGkaRSIRqtfrdLlcvsZht9sFY+yfOBwOUBTFa92dCYFAALFYDNlsFo1GA+12G6ZpwrZt9Ho9P43mvTNlWcb1esX5fIYgCN8vSERoNptgjKFarb5HkIjAGMNyufR05uU5BOCJ////h0Q+69dqtQDgPU0TjUZxu91gGAbC4fDXCyaTSaiqClEUUS6Xoes6TNNEOp328zruiIqiYDAYYLVaYTgcIpVK+SqF44//HfEJXkMk1eKRk3QAAAAASUVORK5CYII=
"
>
</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 could always check yourself if the probabilities given make sense.</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.get_preds" class="doc_header"><code>get_preds</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L331" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Learner-get_preds-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>get_preds</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>, <strong><code>with_loss</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>n_batch</code></strong>:<code>Optional</code>[<code>int</code>]=<strong><em><code>None</code></em></strong>, <strong><code>pbar</code></strong>:<code>Union</code>[<code>MasterBar</code>, <code>ProgressBar</code>, <code>NoneType</code>]=<strong><em><code>None</code></em></strong>) → <code>List</code>[<code>Tensor</code>]</p>
</blockquote>
<div class="collapse" id="Learner-get_preds-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Learner-get_preds-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>get_preds</code>:</p><ul><li><code>pytest -sv tests/test_basic_train.py::test_get_preds</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_basic_train.py#L32" 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 predictions and targets on <code>ds_type</code> 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>It will run inference using the learner on all the data in the <code>ds_type</code> dataset and return the predictions; if <code>n_batch</code> is not specified, it will run the predictions on the default batch size. If <code>with_loss</code>, it will also return the loss on each prediction.</p>
</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 is how you check the default batch size.</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">data</span><span class="o">.</span><span class="n">batch_size</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>64</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">preds</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">preds</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>[tensor([[9.9925e-01, 7.4895e-04],
[9.8333e-01, 1.6672e-02],
[9.9996e-01, 3.8919e-05],
...,
[1.6180e-04, 9.9984e-01],
[2.5164e-02, 9.7484e-01],
[1.8179e-02, 9.8182e-01]]), tensor([0, 0, 0, ..., 1, 1, 1])]</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 first element of the tuple is a tensor that contains all the predictions.</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">preds</span><span class="p">[</span><span class="mi">0</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>tensor([[9.9925e-01, 7.4895e-04],
[9.8333e-01, 1.6672e-02],
[9.9996e-01, 3.8919e-05],
...,
[1.6180e-04, 9.9984e-01],
[2.5164e-02, 9.7484e-01],
[1.8179e-02, 9.8182e-01]])</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>While the second element of the tuple is a tensor that contains all the target labels.</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">preds</span><span class="p">[</span><span class="mi">1</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>tensor([0, 0, 0, ..., 1, 1, 1])</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">preds</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">0</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>tensor(0)</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>For more details about what each number mean, refer to the documentation of <a href="/basic_train.html#predict"><code>predict</code></a>.</p>
<p>Since <a href="/basic_train.html#get_preds"><code>get_preds</code></a> gets predictions on all the data in the <code>ds_type</code> dataset, here the number of predictions will be equal to the number of data in the validation dataset.</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="nb">len</span><span class="p">(</span><span class="n">learn</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">valid_ds</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>2038</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="nb">len</span><span class="p">(</span><span class="n">preds</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="nb">len</span><span class="p">(</span><span class="n">preds</span><span class="p">[</span><span class="mi">1</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>(2038, 2038)</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>To get predictions on the entire training dataset, simply set the <code>ds_type</code> argument accordingly.</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">get_preds</span><span class="p">(</span><span class="n">ds_type</span><span class="o">=</span><span class="n">DatasetType</span><span class="o">.</span><span class="n">Train</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>[tensor([[9.9801e-01, 1.9876e-03],
[1.7900e-06, 1.0000e+00],
[1.3191e-03, 9.9868e-01],
...,
[9.9991e-01, 8.6866e-05],
[1.6420e-04, 9.9984e-01],
[2.2937e-03, 9.9771e-01]]), tensor([0, 1, 1, ..., 0, 1, 1])]</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>To also get prediction loss along with the predictions and the targets, set <code>with_loss=True</code> in the arguments.</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">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>
</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>[tensor([[9.9925e-01, 7.4895e-04],
[9.8333e-01, 1.6672e-02],
[9.9996e-01, 3.8919e-05],
...,
[1.6180e-04, 9.9984e-01],
[2.5164e-02, 9.7484e-01],
[1.8179e-02, 9.8182e-01]]),
tensor([0, 0, 0, ..., 1, 1, 1]),
tensor([7.4911e-04, 1.6813e-02, 3.8624e-05, ..., 1.6165e-04, 2.5486e-02,
1.8347e-02])]</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>Note that the third tensor in the output tuple contains the losses.</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.validate" class="doc_header"><code>validate</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L378" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Learner-validate-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>validate</code>(<strong><code>dl</code></strong>=<strong><em><code>None</code></em></strong>, <strong><code>callbacks</code></strong>=<strong><em><code>None</code></em></strong>, <strong><code>metrics</code></strong>=<strong><em><code>None</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="Learner-validate-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Learner-validate-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>validate</code>:</p><ul><li><code>pytest -sv tests/test_collab_train.py::test_val_loss</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_collab_train.py#L16" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_text_train.py::test_val_loss</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_text_train.py#L56" 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>Validate on <code>dl</code> with potential <code>callbacks</code> and <code>metrics</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>Return the calculated loss and the metrics of the current model on the given data loader <code>dl</code>. The default data loader <code>dl</code> is the validation dataloader.</p>
</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 check the default metrics of the learner using:</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="nb">str</span><span class="p">(</span><span class="n">learn</span><span class="o">.</span><span class="n">metrics</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">