Hi all,
I’m trying to apply what I learned in chapter 4.
Sofar, I have the following notebook.
However, when I run it, I get this error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-11-f9934caba1f5> in <module>()
16
17 # how can the resnet18 automagically infer the number of output/categories to guess?
---> 18 learner = cnn_learner(dls, resnet18, opt_func=SGD, loss_func=nn.CrossEntropyLoss(), metrics=accuracy, lr=0.1)
19
20 learner.fit(20)
1 frames
/usr/local/lib/python3.7/dist-packages/fastai/vision/learner.py in _add_norm(dls, meta, pretrained)
155 stats = meta.get('stats')
156 if stats is None: return
--> 157 if not dls.after_batch.fs.filter(risinstance(Normalize)):
158 dls.add_tfms([Normalize.from_stats(*stats)],'after_batch')
159
AttributeError: 'function' object has no attribute 'fs'
What is the fs
attribute and how can I add it to the dataloaders?
I’ve researched the documentation and it seems that fs
is related to data augmentation. I could find the following sentence from here:
fs
should be list-like, and contain a functions that will be composed together
Not sure what that mean as well