I'm trying to use fastai to train a model but I am getting this error when I try to normalize my data using imagenet stats.
Can someone pls help me with it?
#build fastai dataset loader
np.random.seed(42)
#fastai automatically factors the ./train and ./valid folders into seperate datasets
#more details https://docs.fast.ai/vision.data.html#ImageDataLoaders.from_folder
path = Path(dataset.location)
data = ImageDataLoaders.from_folder(path, size=224, num_workers=4)
data.normalize(imagenet_stats)