I have successfully trained a simple model in Keras to classify images:
model = Sequential()
model.add(Convolution2D(32, 3, 3, border_mode=\'valid\', input_
Softmax might yield "one-hot" like output. Consider the following example:
# Input; Exponent; Softmax value
20 485165195 0.99994
9 8103 0.00002
5 148 0.00000
10 22026 0.00005
------------------------
# Sum 485195473 1
Since the exponential function grows very fast softmax
starts yielding one-hot like output starting from order of magnitude 1. In Keras implementation of the softmax function the maximum value is subtracted from the input, but in the stated above case it won't make any difference.
Possible ways to fix this:
Make sure that input images are rescaled, so that pixels values are between 0
and 1
.
Add some regularizers to your model.