foreword
The load_dataset method of the datasets package can directly load the dataset from the directory and divide it into training, validation
and test sets, as follows:
from datasets import load_dataset
# 加载数据集
ds = load_dataset('imagefolder', data_dir=r'E:\数据集\mydatasets2333')
print(ds)
# DatasetDict({
# train: Dataset({
# features: ['image', 'label'],