ImageNet2012数据集太大了,准备使用自己的数据集进行训练,报错为无效的数据,报错信息:
Traceback (most recent call last):
File "train.py", line 247, in <module>
train_net()
File "/home/ai/anaconda3/zxl/vit/src/model_utils/moxing_adapter.py", line 104, in wrapped_func
run_func(*args, **kwargs)
File "train.py", line 230, in train_net
model.train(epoch_size, dataset, callbacks=cb, sink_size=step_size)
File "/home/ai/anaconda3/envs/mindspore/lib/python3.7/site-packages/mindspore/train/model.py", line 893, in train
raise ValueError("There is no valid data in dataset, please check dataset file firstly.")
ValueError: There is no valid data in dataset, please check dataset file firstly.
我阅读代码后发现数据的加载使用的是ImageFolderDataset,我的数据集如下:
执行train.py后就报错为无效数据
请问训练官方的VIT脚本时数据集结构应该是怎样的
问题找到了,batch_size太大了导致的