Utilities for collecting/checking fastai
user environment
from fastai.utils.mod_display import *
from fastai.gen_doc.nbdoc import *
from fastai.utils.collect_env import *
show_doc(progress_disabled)
class
progress_disabled
[source][test]
progress_disabled
(learner
:Learner
)
No tests found for progress_disabled
. To contribute a test please refer to this guide and this discussion.
Context manager to disable the progress update bar and Recorder print
from fastai.vision import *
path = untar_data(URLs.MNIST_SAMPLE)
data = ImageDataBunch.from_folder(path)
learn = cnn_learner(data, models.resnet18, metrics=accuracy)
learn.fit()
will display a progress bar and give the final results once completed:
learn.fit(1)
epoch | train_loss | valid_loss | accuracy | time |
---|---|---|---|---|
0 | 0.139825 | 0.081791 | 0.974975 | 00:06 |
progress_disabled(learn)
will remove all that update and only show the total time once completed.
with progress_disabled(learn) as learn:
learn.fit(1)
Total time: 00:05