Fish.ipynb error

Last cell in section Our first model with Center Cropping results in an error:

RuntimeError: element 0 of variables does not require grad and does not have a grad_fn

One of the lines in in this cell is:

learn.freeze_to(6) which seems incorrect. The 7th layer is not trainable… the model is:
Sequential(
(0): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True)
(1): Dropout(p=0.5)
(2): Linear(in_features=1024, out_features=512, bias=True)
(3): ReLU()
(4): BatchNorm1d(512, eps=1e-05, momentum=0.1, affine=True)
(5): Dropout(p=0.5)
(6): Linear(in_features=512, out_features=8, bias=True)
(7): LogSoftmax()
)

Isn’t ImageClassifierData.from_csv(PATH, ‘images’, label_csv, tfms=tfms, val_idxs=val_idxs,continuous=True, skip_header=False)
supposed to resize images to size=sz?

I am getting an index out of bound when few cells later I have

learn = ConvLearner.pretrained(resnet34, data, precompute=True, opt_fn=optim.Adam, ps=0.5)