In [ ]:

    In [ ]:

    1. dls = get_data(URLs.IMAGENETTE_160, 160, 128)

    We’ll create a ResNet-34 without pretraining, and pass along any arguments received:

    In [ ]:

    In [ ]:

    Now let’s try plain SGD. We can pass opt_func (optimization function) to cnn_learner to get fastai to use any optimizer:

    In [ ]:

    The first thing to look at is :

      Out[ ]:

      It looks like we’ll need to use a higher learning rate than we normally use:

      In [ ]:

      1. learn.fit_one_cycle(3, 0.03, moms=(0,0,0))
      epochtrain_lossvalid_lossaccuracytime
      02.9694122.2145960.24203800:09
      12.4427301.8459500.36254800:09
      22.1571591.7411430.40891700:09

      Clearly, plain SGD isn’t training as fast as we’d like. So let’s learn some tricks to get accelerated training!