项目场景:
Linux系统
facenet模型
运行train_softmax.py时
问题描述:
类似这些问题:
ValueError: Cannot have number of splits n_splits=10 greater than the number of samples: n_samples=0.
ValueError: Cannot have number of splits n_splits=10 greater than the number of samples: n_samples=3.
原因分析:
自己的数据集图片的格式或是生成的pairs.txt文件有问题
解决思路:
如果是自己的数据集则需要重新生成pairs.txt
如果主程序默认图像的格式是png的话,需要将自己的图像格式变成png(或者修改主程序中的default=JPG)
自己数据集的图片一定要和lfw.py程序中的图像形式一样!
如Aaron_Eckhart_0001(程序中写道有四位数%4d)
重点关注:
lfw.py中的path0和path2
facenet.py
train.softmax.py