New answers tagged activation-function
0
Since you're using categorical cross-entropy loss, the last layer (output layer) should come with softmax activation instead of identity (as being blank in layers.Dense(4)).
model = tf.keras.Sequential([
normalize,
...,
layers.Dense(4, activation=tf.keras.activations.softmax)
])
And SparseCategoricalCrossentropy is different from ...
Top 50 recent answers are included
Related Tags
activation-function × 105neural-networks × 71
deep-learning × 28
machine-learning × 21
relu × 16
convolutional-neural-networks × 11
loss-functions × 9
math × 9
backpropagation × 7
sigmoid × 6
classification × 5
deep-neural-networks × 5
regression × 5
function-approximation × 5
hidden-layers × 5
gradient-descent × 4
artificial-neuron × 4
hyper-parameters × 4
perceptron × 4
vanishing-gradient-problem × 4
reinforcement-learning × 3
comparison × 3
tensorflow × 3
ai-design × 3
keras × 3