Keras Binary Classifier Model.Predict() class association?

651 Views Asked by At

A bit of a noob question but ive used Keras to train a neural net as a binary classifier. Now i want to call model.predict_classes() on new unseen data to see how well its generalising.... this is a stupid question but is there any way to understand what class the 0 or 1 correspond to from my training / validation data????

I suppose it would be good to know how i can identify which is positive / negative (i.e. 0 or 1) or A/B, Cat/Dog etc etc. I imagine ive overlooked this earlier when building the model

Also it would be good to get some feedback on my code....

enter image description here

1

There are 1 best solutions below

0
On

I think it depends on which class you feed into your classifier first when training. But you could always relabel your training images with corresponding names so that when you classify new images the result will show your new labels instead of numbers.