0

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)
Soumya
  • 1
  • A quick google search gives a few possible solutions, for instance [this answer in this same site](https://datascience.stackexchange.com/a/113149/14675). Did they not work for your case or were they not applicable in some way? (I assume you googled the error before posting here asking others for help) – noe Feb 10 '23 at 19:35

0 Answers0