Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error Found array with 0 sample(s) (shape=(0, 512)) while a minimum of 1 is required #1222

Open
AlexeyAL1e opened this issue May 18, 2022 · 1 comment

Comments

@AlexeyAL1e
Copy link

AlexeyAL1e commented May 18, 2022

i am trying to train a neural network on my own dataset and have it classify the test dataset with high accuracy
Firstly, I formed my dataset of 30 personalities, each person has 34 face photos. after that i used #356 (comment) commands to align and get the loss with using script softmax.py
Second, I had to run this script to get the .pb file
python src/freeze_graph.py .model_dir output_file.pb
Thirdly I got a .pkl file using this
python src/classifier.py TRAIN ~/datasets/my_dataset/train/ ~/models/model-20170216-091149.pb ~/models/my_classifier.pkl --batch_size 34
Now, I use my model to identify faces in my test dataset, with run script:
python src/classifier.py CLASSIFY ~/datasets/my_dataset/test/ ~/models/model-20170216-091149.pb ~/models/my_classifier.pkl --batch_size 34
but I get an error Found array with 0 sample(s) (shape=(0, 512)) while a minimum of 1 is required, it looks like the file .pkl, there are no entries for embedded images
Tell me, if these are all points, then what am I doing wrong?

@AlexeyAL1e AlexeyAL1e changed the title error Found array with 0 sample(s) (shape=(0, 512)) while a minimum of 1 is required, it looks like the file .pkl, there are no entries for embedded images error Found array with 0 sample(s) (shape=(0, 512)) while a minimum of 1 is required May 18, 2022
@Zhou-Yicheng
Copy link

python src/classifier.py CLASSIFY ~/datasets/my_dataset/test/ ~/models/model-20170216-091149.pb ~/models/my_classifier.pkl --batch_size 34

Change to
python src/classifier.py CLASSIFY ~/datasets/my_dataset/train/ ~/models/model-20170216-091149.pb ~/models/my_classifier.pkl --batch_size 34 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants