use_clr_beta
Aiming to replicate these results.
In [1]:
%matplotlib inline
%reload_ext autoreload
%autoreload 2
from fastai.conv_learner import *
from pathlib import Path
import utils_misc
In [2]:
PATH = Path('data/cifar10')
PATH_CPU = PATH/'cpu'
In [3]:
utils_misc.create_cpu_dataset(PATH, p=0.1)
utils_misc.count_files(PATH_CPU/'train')
Out[3]:
In [4]:
cifar_stats = (np.array([ 0.4914 , 0.48216, 0.44653]), np.array([ 0.24703, 0.24349, 0.26159]))
sz = 32
bs = 64
In [5]:
tfms = tfms_from_stats(cifar_stats, sz, aug_tfms=transforms_side_on, pad=sz//8)
mdata = ImageClassifierData.from_paths(PATH, trn_name='cpu/train', val_name='test', tfms=tfms, bs=bs)
In [6]:
f_model = resnet18
In [7]:
learner = ConvLearner.pretrained(f_model, mdata)
In [10]:
learner.lr_find()
learner.sched.plot()
In [12]:
learner.fit(0.01, n_cycle=1, cycle_len=10, use_clr_beta=(10,10,0.95,0.85))
Out[12]:
In [14]:
learner.sched.plot_lr()
In [49]:
learner.fit(0.2, n_cycle=1, cycle_len=10, use_clr_beta=(10,10,0.95,0.85))
Out[49]:
In [ ]: