init(rangeFrom:to:by:)
Creates a one-dimensional tensor representing a sequence from a starting value to, but not including, an end value, stepping by the specified amount.
Declaration
init(rangeFrom start: Float, to end: Float, by stride: Float.Stride)Parameters
- start:
The starting value to use for the sequence. If the sequence contains any values, the first one is
start. - end:
An end value to limit the sequence.
endis never an element of the resulting sequence. - stride:
The amount to step by with each iteration.
stridemust be positive.
See Also
Creating a tensor
init(_:)init(_:alongAxis:)init(_:scalarType:)init(bytesNoCopy:shape:scalarType:deallocator:)init(concatenating:alongAxis:)init(linearSpaceFrom:through:count:)init(linearSpaceFrom:through:count:scalarType:)init(ones:scalarType:)init(randomNormal:mean:standardDeviation:seed:scalarType:)init(randomUniform:in:seed:scalarType:)init(rangeFrom:to:by:scalarType:)init(repeating:shape:)init(repeating:shape:scalarType:)init(shape:data:scalarType:)init(shape:scalars:)