init(linearSpaceFrom:through:count:)
Creates a one-dimensional tensor representing a sequence from a starting value, up to and including an end value, spaced evenly to generate the number of values specified.
Declaration
init(linearSpaceFrom start: Float, through end: Float, count: Int)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 the last element of the resulting sequence. - count:
The number of values in the resulting sequence.
countmust be positive and greater than1.
See Also
Creating a tensor
init(_:)init(_:alongAxis:)init(_:scalarType:)init(bytesNoCopy:shape:scalarType:deallocator:)init(concatenating:alongAxis:)init(linearSpaceFrom:through:count:scalarType:)init(ones:scalarType:)init(randomNormal:mean:standardDeviation:seed:scalarType:)init(randomUniform:in:seed:scalarType:)init(rangeFrom:to:by:)init(rangeFrom:to:by:scalarType:)init(repeating:shape:)init(repeating:shape:scalarType:)init(shape:data:scalarType:)init(shape:scalars:)