阅读(3225) (9)

TensorFlow函数教程:tf.keras.activations.softmax

2019-03-01 16:03:25 更新

tf.keras.activations.softmax函数

tf.keras.activations.softmax(
    x,
    axis=-1
)

定义在:tensorflow/python/keras/activations.py。

Softmax激活函数。

参数:

  • x:输入张量。
  • axis:整数,应用softmax标准化的轴。

返回:

张量,softmax变换的输出。

可能引发的异常:

  • ValueError:如果dim(x) == 1。