codecamp

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

tf.keras.backend.arange函数

tf.keras.backend.arange(
    start,
    stop=None,
    step=1,
    dtype='int32'
)

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

创建包含整数序列的1D张量。

函数参数使用与Theano的arange相同的约定:如果只提供一个参数,它实际上是“stop”参数,并且“start”参数为0。

返回张量的默认类型是'int32',匹配TensorFlow的默认值。

参数:

  • start:开始值。
  • stop:停止值。
  • step:两个连续值之间的差异。
  • dtype:要使用的整数dtype。

返回:

整数张量。

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