codecamp

TensorFlow函数教程:tf.keras.backend.expand_dims

tf.keras.backend.expand_dims函数

tf.keras.backend.expand_dims(
    x,
    axis=-1
)

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

在索引“axis”处添加1个大小的维度。

参数:

  • x:张量或变量。
  • axis:定位添加新轴的位置。

返回:

具有扩展维度的张量。

TensorFlow函数教程:tf.keras.backend.exp
TensorFlow函数教程:tf.keras.backend.eye
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定