When we are using datasets of pytorch, is it necessary to have separated folder for each class ? In my testing phase, I have a folder that all cats and dogs pictures are there, unlike the training and dev folders that they were separated,  so when I run the test phase it gives me this error RuntimeError: Found 0 files in subfolders of: /scratch/amirzaei/pytorch/catvsdog/test which apparently it looks for separated folder for cats and dogs. this is the my test module:
import os
import os.path
import csv
import glob
import numpy as np
# import matplotlib.pyplot as plt
# from PIL import Image
#from sklearn.metrics import confusion_matrix



import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable

import torchvision
import torchvision.datasets as datasets
import torchvision.models as models
import torchvision.transforms as transforms


#some initial setup
np.set_printoptions(precision=2)
use_gpu = torch.cuda.is_available()
np.random.seed(1234)
#print(use_gpu)

DATA_DIR = "/scratch/amirzaei/pytorch/catvsdog/train/"
DATA_TST_DIR = "/scratch/amirzaei/pytorch/catvsdog/test"

sz = 224
batch_size = 16


trn_dir = f'{DATA_DIR}'
tst_dir = f'{DATA_TST_DIR}'


tfms = transforms.Compose([
    transforms.Resize((sz, sz)),
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])

test_ds  = datasets.ImageFolder(tst_dir, transform=tfms)
test_dl  = torch.utils.data.DataLoader(test_ds, batch_size = 1, shuffle=False, num_workers=1, pin_memory=False)

class SimpleCNN(nn.Module):
    
    
    def __init__(self):
        super(SimpleCNN, self).__init__()
        
        self.conv1 = nn.Sequential(
            nn.Conv2d(3, 16, kernel_size=5, padding=2),
            nn.BatchNorm2d(16),
            nn.ReLU(),
            nn.MaxPool2d(2)
        )
        
        self.conv2 = nn.Sequential(
            nn.Conv2d(16, 32, kernel_size=5, padding=2),
            nn.BatchNorm2d(32),
            nn.ReLU(),
            nn.MaxPool2d(2)
        )
        
        self.fc = nn.Linear(56*56*32, 2)
        
    def forward(self, x):
        out = self.conv1(x)
        out = self.conv2(out)
        out = out.view(out.size(0), -1)
        out = self.fc(out)
        return out


def test( model, test_loader):
    model.cuda()
    model.eval()
    csv_map = {}
    # switch to evaluate mode
    filepath = 1
    model.eval()
    for i, (images, _ ) in enumerate(test_loader):
        # pop extension, treat as id to map

        image_var = torch.autograd.Variable(images.cuda(), volatile=True)
        y_pred = model(image_var.cuda())
        # get the index of the max log-probability
        smax = nn.Softmax()
        smax_out = smax(y_pred)[0]
        cat_prob = smax_out.data[0]
        dog_prob = smax_out.data[1]
        prob = dog_prob
        if cat_prob > dog_prob:
            prob = 1 - cat_prob
        prob = np.around(prob, decimals=4)
        prob = np.clip(prob, .0001, .999)
        csv_map[filepath] = float(prob.data[0])
        filepath += 1
        # print("{},{}".format(filepath, prob[0]))

    with open('{}entry.csv'.format(DATA_TST_DIR),'w') as csvfile:
        fieldnames = ['id', 'label']
        csv_w = csv.writer(csvfile)
        csv_w.writerow(('id', 'label'))
        for row in sorted(csv_map.items()):
            csv_w.writerow(row)

    return	

model = SimpleCNN()
model.load_state_dict(torch.load('/scratch/amirzaei/pytorch/catvsdog/SAVED_MODEL.pth'))
test(model, test_dl)