在區間內生成值。
用法
tf.raw_ops.LinSpace(
start, stop, num, name=None
)
參數
-
start
一個Tensor
。必須是以下類型之一:bfloat16
,half
,float32
,float64
。 0-D 張量。範圍內的第一個條目。 -
stop
一個Tensor
。必須與start
具有相同的類型。 0-D 張量。範圍內的最後一個條目。 -
num
一個Tensor
。必須是以下類型之一:int32
,int64
。 0-D 張量。要生成的值的數量。 -
name
操作的名稱(可選)。
返回
-
一個
Tensor
。具有與start
相同的類型。
從 start
開始生成一係列 num
evenly-spaced 值。如果是 num > 1
,則序列中的值會增加 stop - start / num - 1
,因此最後一個值正好是 stop
。
例如:
tf.linspace(10.0, 12.0, 3, name="linspace") => [ 10.0 11.0 12.0]
相關用法
- Python tf.raw_ops.ListDiff用法及代碼示例
- Python tf.raw_ops.LogSoftmax用法及代碼示例
- Python tf.raw_ops.L2Loss用法及代碼示例
- Python tf.raw_ops.LSTMBlockCell用法及代碼示例
- Python tf.raw_ops.LogicalOr用法及代碼示例
- Python tf.raw_ops.LessEqual用法及代碼示例
- Python tf.raw_ops.LeftShift用法及代碼示例
- Python tf.raw_ops.Log1p用法及代碼示例
- Python tf.raw_ops.LogicalNot用法及代碼示例
- Python tf.raw_ops.Lgamma用法及代碼示例
- Python tf.raw_ops.Less用法及代碼示例
- Python tf.raw_ops.LRN用法及代碼示例
- Python tf.raw_ops.Log用法及代碼示例
- Python tf.raw_ops.LogicalAnd用法及代碼示例
- Python tf.raw_ops.TPUReplicatedInput用法及代碼示例
- Python tf.raw_ops.Bitcast用法及代碼示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代碼示例
- Python tf.raw_ops.BatchMatMul用法及代碼示例
- Python tf.raw_ops.OneHot用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.LinSpace。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。