Training with a softmax
output layer for my generative neural network gives better results than with relu
overall but relu
gives me the sparsity I need (zeros in pixels).
Softmax
also helps get a normalised output (i.e. sum =1.).
I want to do:
outputs = Dense(200, activation='softmax', activity_regularizer=l1(1e-5))(x)
outputs = Activation('relu')(outputs) # to get real zeros
outputs = Activation('softmax')(outputs) # still real zeros, normalized output
But by applying successive softmax I will get extreme outputs. Is there a layer I can use instead which just normalizes the output to 1 (output_i/sum(output)) instead of softmax ?