Keras' Fit_generator() For Binary Classification Predictions Always 50%
I have set up a model to train on classifying whether an image is a certain video game or not. I pre-scaled my images into 250x250 pixels and have them separated into two folders (
Solution 1:
I think your problem is that you're using sigmoid for binary classification, your final layer activation function should be linear.
Solution 2:
The problem is that you are using softmax
on a Dense layer with one unit. Softmax function normalizes its input such that the sum of its elements becomes equal to one. So if it has one unit, then the output would be always 1. Instead, for binary classification you need to use sigmoid
function as the activation function of last layer.
Post a Comment for "Keras' Fit_generator() For Binary Classification Predictions Always 50%"