init(linearSpaceFrom:through:count:scalarType:)
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<Scalar>(linearSpaceFrom start: Scalar, through end: Scalar, count: Int, scalarType: Scalar.Type = Scalar.self) where Scalar : MLTensorScalar, Scalar : BinaryFloatingPointParameters
- 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 greater than1. - scalarType:
The scalar type.
See Also
Creating a tensor
init(_:)init(_:alongAxis:)init(_:scalarType:)init(bytesNoCopy:shape:scalarType:deallocator:)init(concatenating:alongAxis:)init(linearSpaceFrom:through:count:)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:)