NameError: name 'ImageDataBunch' is not defined

Hi All,
I am newbie to the fastai course , recently I have started.
After gone through the jeremy videos , I have installed fastai in my windows laptop and started the lesson 1,
While woking with code, I was run in to this error.

data = ImageDataBunch.from_name_re(path_img, fnames, pat, ds_tfms=get_transforms(), size=224, bs=bs
                                  ).normalize(imagenet_stats)

Here the error:

NameError: name 'ImageDataBunch' is not defined

then I downgraded to fastai version 2 to version 1.
still I am facing the same error. How can i fix this.

For this you should use fastai v2 (upgrade to the latest fastai) and use ImageDataLoaders

Videos can become outdated code, so be sure to check the fastbook repo to see what the right latest code is for that chapter :smiley:

Thanks for the reply @muellerzr