ImageDataBunch.from_folder does not accept the test dataset

Hi.

I have a test dataset that I’m trying to supply to my ImageDataBunch.from_folder() but its not recognizing it for some reason.

train_image_path = Path('Food-101/images')
test_image_path = Path('Food-101/test')
path = Path('Food-101')

food_names_tr = get_image_files(train_image_path)
food_names_ts = get_image_files(test_image_path)

file_parse = r'/([^/]+)_\d+\.(png|jpg|jpeg)$'

data = ImageDataBunch.from_folder(train_image_path, test_image_path, valid_pct=0.2, ds_tfms=get_transforms(), size=224)
data.normalize(imagenet_stats)

And this is my output:

ImageDataBunch;

Train: LabelList (60600 items)
x: ImageList
Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224)
y: CategoryList
images,images,images,images,images
Path: Food-101/images;

Valid: LabelList (15150 items)
x: ImageList
Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224)
y: CategoryList
images,images,images,images,images
Path: Food-101/images;

Test: None

According to the documentation

https://docs.fast.ai/vision.data.html#ImageDataBunch.from_folder

train test and valid Folders have to be on the same level. Try moving test to the same folder as train or create a link to test folder from folder containing train and valid. In the result you may want to see something like this

path\
  train\
    clas1\
    clas2\
    ...
  valid\
    clas1\
    clas2\
    ...
  test\

I only have folders for train and test. I haven’t created anything for validation.