Prepare as many as possible sample images. Put them into each folders by the classification/labels.
For this i will use mine from this story. You can use cat and dog
or mnist
dataset for this.
Create variable X_TRAIN
and Y_TRAIN
. Both of them as array.
Create variable arrays called labels
that contains the name of labels or classifications of your model.
Save the index of variable labels
into variable Y_TRAIN
. We implicitly encoding that labels into number. So that we can pass it to model.
Load the image folders. Iterate 1 by 1 the files and adding including the index of label name into variable array. For this variable X_TRAIN
.
#deep-learning #training #tensorflow #keras