Softmax¶
- class
dragon.vm.tensorflow.keras.layers.
Softmax
(
axis=- 1,
**kwargs
)[source]¶ Layer to apply the softmax function.
The Softmax function is defined as:
\[\text{Softmax}(x_{i}) = \frac{\exp(x_{i})}{\sum_{j} \exp(x_{j})} \]Examples:
x = tf.constant([-1, 0, 1], 'float32') print(tf.keras.layers.Softmax(inplace=False)(x))