MLModel
public func makeState() -> CoreML.MLState
MLModel
public func prediction(from inputs: [Swift.String : CoreML.MLTensor]) async throws -> [Swift.String : CoreML.MLTensor]
MLModel
public func prediction(from inputs: [Swift.String : CoreML.MLTensor], using state: CoreML.MLState) async throws -> [Swift.String : CoreML.MLTensor]
MLModel
public func prediction(from input: any CoreML.MLFeatureProvider, using state: CoreML.MLState, options: CoreML.MLPredictionOptions = MLPredictionOptions()) async throws -> any CoreML.MLFeatureProvider
MLShapedArray
public func changingLayout(to bufferLayout: CoreML.MLShapedArrayBufferLayout) -> CoreML.MLShapedArray<Scalar>
MLShapedArray
public func expandingShape(at axis: Swift.Int) -> CoreML.MLShapedArray<Scalar>
MLShapedArray
public func reshaped(to newShape: [Swift.Int]) -> CoreML.MLShapedArray<Scalar>
MLShapedArray
public func squeezingShape() -> CoreML.MLShapedArray<Scalar>
MLShapedArray
public func transposed() -> CoreML.MLShapedArray<Scalar>
MLShapedArray
public func transposed(permutation axes: [Swift.Int]) -> CoreML.MLShapedArray<Scalar>
MLShapedArray
public mutating func withMutablePixelBufferIfAvailable<R>(_ body: (_ pixelBuffer: CoreVideo.CVPixelBuffer) throws -> R) rethrows -> R?
MLShapedArray
public func withPixelBufferIfAvailable<R>(_ body: (_ pixelBuffer: CoreVideo.CVPixelBuffer) throws -> R) rethrows -> R?
MLShapedArray
public mutating func withUnsafeMutableShapedBufferPointer<R>(using bufferLayout: CoreML.MLShapedArrayBufferLayout, _ body: (_ ptr: inout Swift.UnsafeMutableBufferPointer<Scalar>, _ shape: [Swift.Int], _ strides: [Swift.Int]) throws -> R) rethrows -> R
MLShapedArraySlice
public func changingLayout(to bufferLayout: CoreML.MLShapedArrayBufferLayout) -> CoreML.MLShapedArraySlice<Scalar>
MLShapedArraySlice
public func expandingShape(at axis: Swift.Int) -> CoreML.MLShapedArraySlice<Scalar>
MLShapedArraySlice
public func reshaped(to newShape: [Swift.Int]) -> CoreML.MLShapedArraySlice<Scalar>
MLShapedArraySlice
public func squeezingShape() -> CoreML.MLShapedArraySlice<Scalar>
MLShapedArraySlice
public func transposed() -> CoreML.MLShapedArraySlice<Scalar>
MLShapedArraySlice
public func transposed(permutation axes: [Swift.Int]) -> CoreML.MLShapedArraySlice<Scalar>
MLShapedArraySlice
public mutating func withUnsafeMutableShapedBufferPointer<R>(using bufferLayout: CoreML.MLShapedArrayBufferLayout, _ body: (_ ptr: inout Swift.UnsafeMutableBufferPointer<Scalar>, _ shape: [Swift.Int], _ strides: [Swift.Int]) throws -> R) rethrows -> R
MLState
public func withMultiArray<R>(for stateName: Swift.String, _ body: (CoreML.MLMultiArray) throws -> R) rethrows -> R
MLTensor
public static func % (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func % (lhs: some MLTensorScalar & Numeric, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
@_disfavoredOverload public static func % (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func %= (lhs: inout CoreML.MLTensor, rhs: CoreML.MLTensor)
MLTensor
public static func * (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func * (lhs: some MLTensorScalar & Numeric, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func * (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func *= (lhs: inout CoreML.MLTensor, rhs: CoreML.MLTensor)
MLTensor
public static func + (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func + (lhs: some MLTensorScalar & Numeric, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func + (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func += (lhs: inout CoreML.MLTensor, rhs: CoreML.MLTensor)
MLTensor
public static func - (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func - (lhs: some MLTensorScalar & Numeric, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func - (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
prefix public static func - (rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func -= (lhs: inout CoreML.MLTensor, rhs: CoreML.MLTensor)
MLTensor
prefix public static func .! (rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .!= (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func .!= (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .& (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .< (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func .< (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .<= (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func .<= (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .== (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func .== (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .> (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func .> (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .>= (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func .>= (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .^ (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func .| (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func / (lhs: CoreML.MLTensor, rhs: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
public static func / (lhs: some MLTensorScalar & Numeric, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func / (lhs: CoreML.MLTensor, rhs: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public static func /= (lhs: inout CoreML.MLTensor, rhs: CoreML.MLTensor)
MLTensor
public func abs() -> CoreML.MLTensor
MLTensor
public func acos() -> CoreML.MLTensor
MLTensor
public func acosh() -> CoreML.MLTensor
MLTensor
public func all(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func all(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func all(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func any(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func any(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func any(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func argmax() -> CoreML.MLTensor
MLTensor
public func argmax(alongAxis axis: Swift.Int, keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func argmin() -> CoreML.MLTensor
MLTensor
public func argmin(alongAxis axis: Swift.Int, keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func argsort(alongAxis axis: Swift.Int = -1, descendingOrder: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func asin() -> CoreML.MLTensor
MLTensor
public func asinh() -> CoreML.MLTensor
MLTensor
public func atan() -> CoreML.MLTensor
MLTensor
public func atanh() -> CoreML.MLTensor
MLTensor
public func bandPart(lowerBandCount: Swift.Int, upperBandCount: Swift.Int) -> CoreML.MLTensor
MLTensor
public func cast(like other: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public func cast<Scalar>(to scalarType: Scalar.Type) -> CoreML.MLTensor where Scalar : CoreML.MLTensorScalar
MLTensor
public func ceil() -> CoreML.MLTensor
MLTensor
public func clamped(to bounds: Swift.ClosedRange<Swift.Float>) -> CoreML.MLTensor
MLTensor
public func clamped(to bounds: Swift.PartialRangeFrom<Swift.Float>) -> CoreML.MLTensor
MLTensor
public func clamped(to bounds: Swift.PartialRangeThrough<Swift.Float>) -> CoreML.MLTensor
MLTensor
public func concatenated(with other: CoreML.MLTensor, alongAxis axis: Swift.Int = 0) -> CoreML.MLTensor
MLTensor
public func cos() -> CoreML.MLTensor
MLTensor
public func cosh() -> CoreML.MLTensor
MLTensor
public func cumulativeProduct(alongAxis axis: Swift.Int = 0) -> CoreML.MLTensor
MLTensor
public func cumulativeSum(alongAxis axis: Swift.Int = 0) -> CoreML.MLTensor
MLTensor
public func exp() -> CoreML.MLTensor
MLTensor
public func exp2() -> CoreML.MLTensor
MLTensor
public func expandingShape(at axes: Swift.Int...) -> CoreML.MLTensor
MLTensor
public func expandingShape(at axes: [Swift.Int]) -> CoreML.MLTensor
MLTensor
public func flattened() -> CoreML.MLTensor
MLTensor
public func floor() -> CoreML.MLTensor
MLTensor
public func gathering(atIndices indices: CoreML.MLTensor, alongAxis axis: Swift.Int) -> CoreML.MLTensor
MLTensor
public func gathering(atIndices indices: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public func log() -> CoreML.MLTensor
MLTensor
public func matmul(_ other: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public func max(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func max(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func max(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func mean(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func mean(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func mean(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func min(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func min(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func min(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func padded(forSizes sizes: [(before: Swift.Int, after: Swift.Int)], with value: Swift.Float) -> CoreML.MLTensor
MLTensor
public func padded(forSizes sizes: [(before: Swift.Int, after: Swift.Int)], mode: CoreML.MLTensor.PaddingMode) -> CoreML.MLTensor
MLTensor
public func pow(_ exponent: some MLTensorScalar & Numeric) -> CoreML.MLTensor
MLTensor
@_disfavoredOverload public func pow(_ exponent: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public func product(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func product(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func product(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func reciprocal() -> CoreML.MLTensor
MLTensor
public func replacing(with replacement: CoreML.MLTensor, where mask: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public func replacing(with replacement: some MLTensorScalar, where mask: CoreML.MLTensor) -> CoreML.MLTensor
MLTensor
public func replacing(atIndices indices: CoreML.MLTensor, with replacement: some MLTensorScalar, alongAxis axis: Swift.Int) -> CoreML.MLTensor
MLTensor
public func replacing(with replacement: CoreML.MLTensor, atIndices indices: CoreML.MLTensor, alongAxis axis: Swift.Int) -> CoreML.MLTensor
MLTensor
public func reshaped(to newShape: [Swift.Int]) -> CoreML.MLTensor
MLTensor
public func resized(to size: (newHeight: Swift.Int, newWidth: Swift.Int), method: CoreML.MLTensor.ResizeMethod = .nearestNeighbor) -> CoreML.MLTensor
MLTensor
public func reversed(alongAxes axes: Swift.Int...) -> CoreML.MLTensor
MLTensor
public func reversed(alongAxes axes: [Swift.Int]) -> CoreML.MLTensor
MLTensor
public func round() -> CoreML.MLTensor
MLTensor
public func rsqrt() -> CoreML.MLTensor
MLTensor
public func shapedArray<Scalar>(of scalarType: Scalar.Type) async -> CoreML.MLShapedArray<Scalar> where Scalar : CoreML.MLShapedArrayScalar, Scalar : CoreML.MLTensorScalar
MLTensor
public func sign() -> CoreML.MLTensor
MLTensor
public func sin() -> CoreML.MLTensor
MLTensor
public func sinh() -> CoreML.MLTensor
MLTensor
public func softmax(alongAxis axis: Swift.Int = -1) -> CoreML.MLTensor
MLTensor
public func split(count: Swift.Int, alongAxis axis: Swift.Int = 0) -> [CoreML.MLTensor]
MLTensor
public func split(sizes: [Swift.Int], alongAxis axis: Swift.Int = 0) -> [CoreML.MLTensor]
MLTensor
public func squareRoot() -> CoreML.MLTensor
MLTensor
public func squared() -> CoreML.MLTensor
MLTensor
public func squeezingShape() -> CoreML.MLTensor
MLTensor
public func squeezingShape(at axes: Swift.Int...) -> CoreML.MLTensor
MLTensor
public func squeezingShape(at axes: [Swift.Int]) -> CoreML.MLTensor
MLTensor
public func sum(keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func sum(alongAxes axes: Swift.Int..., keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func sum(alongAxes axes: [Swift.Int], keepRank: Swift.Bool = false) -> CoreML.MLTensor
MLTensor
public func tan() -> CoreML.MLTensor
MLTensor
public func tanh() -> CoreML.MLTensor
MLTensor
public func tiled(multiples: [Swift.Int]) -> CoreML.MLTensor
MLTensor
public func topK(_ k: Swift.Int) -> (values: CoreML.MLTensor, indices: CoreML.MLTensor)
MLTensor
public func transposed() -> CoreML.MLTensor
MLTensor
public func transposed(permutation: Swift.Int...) -> CoreML.MLTensor
MLTensor
public func transposed(permutation: [Swift.Int]) -> CoreML.MLTensor
MLTensor
public func unstacked(alongAxis axis: Swift.Int = 0) -> [CoreML.MLTensor]
MLTensorRangeExpression
public static func closedRange(_ range: Swift.ClosedRange<Swift.Int>, stride: Swift.Int = 1) -> any CoreML.MLTensorRangeExpression
MLTensorRangeExpression
public static func index(_ index: Swift.Int) -> any CoreML.MLTensorRangeExpression
MLTensorRangeExpression
public static func partialRangeFrom(_ range: Swift.PartialRangeFrom<Swift.Int>, stride: Swift.Int = 1) -> any CoreML.MLTensorRangeExpression
MLTensorRangeExpression
public static func partialRangeUpTo(_ range: Swift.PartialRangeUpTo<Swift.Int>, stride: Swift.Int = 1) -> any CoreML.MLTensorRangeExpression
MLTensorRangeExpression
public static func partialRangeUpTo(_ range: Swift.PartialRangeThrough<Swift.Int>, stride: Swift.Int = 1) -> any CoreML.MLTensorRangeExpression
MLTensorRangeExpression
public static func range(_ range: Swift.Range<Swift.Int>, stride: Swift.Int = 1) -> any CoreML.MLTensorRangeExpression
public func pointwiseMax(_ lhs: CoreML.MLTensor, _ rhs: CoreML.MLTensor) -> CoreML.MLTensor
public func pointwiseMin(_ lhs: CoreML.MLTensor, _ rhs: CoreML.MLTensor) -> CoreML.MLTensor
public func withMLTensorComputePolicy<Result>(_ computePolicy: CoreML.MLComputePolicy, _ body: () throws -> Result) rethrows -> Result
public func withMLTensorComputePolicy<R>(_ computePolicy: CoreML.MLComputePolicy, _ body: () async throws -> R) async rethrows -> R
Transferring
- (void)transferToMultiArray:(nonnull MLMultiArray *)destinationMultiArray;
MLModelAsset
+ (nullable instancetype)modelAssetWithSpecificationData:(nonnull NSData *)specificationData blobMapping:(nonnull NSDictionary<NSURL *,NSData *> *)blobMapping error:(NSError * _Nullable * _Nullable)error;
MLModelAsset
+ (nullable instancetype)modelAssetWithURL:(nonnull NSURL *)compiledModelURL error:(NSError * _Nullable * _Nullable)error;
MLModelAsset
- (void)modelDescriptionWithCompletionHandler:(nonnull void (^)(MLModelDescription * _Nullable, NSError * _Nullable))handler;
MLModelAsset
- (void)modelDescriptionOfFunctionNamed:(nonnull NSString *)functionName completionHandler:(nonnull void (^)(MLModelDescription * _Nullable, NSError * _Nullable))handler;
MLModelAsset
- (void)functionNamesWithCompletionHandler:(nonnull void (^)(NSArray<NSString *> * _Nullable, NSError * _Nullable))handler;
MLComputePolicy
public init(_ computeUnits: CoreML.MLComputeUnits)
MLFeatureValue
convenience public init(_ value: CoreML.MLSendableFeatureValue)
MLMultiArray
convenience public init(shape: [Swift.Int], dataType: CoreML.MLMultiArrayDataType, strides: [Swift.Int])
MLShapedArray
public init<S>(scalars: S, shape: [Swift.Int]) where Scalar == S.Element, S : Swift.Sequence
MLShapedArray
public init(mutating pixelBuffer: CoreVideo.CVPixelBuffer, shape: [Swift.Int])
MLShapedArray
public init(_ multiArray: CoreML.MLMultiArray)
MLShapedArraySlice
public init<S>(scalars: S, shape: [Swift.Int]) where Scalar == S.Element, S : Swift.Sequence
MLShapedArraySlice
public init(mutating pixelBuffer: CoreVideo.CVPixelBuffer, shape: [Swift.Int])
MLShapedArraySlice
public init(_ multiArray: CoreML.MLMultiArray)
MLTensor
public init(concatenating tensors: some Collection<MLTensor>, alongAxis axis: Swift.Int = 0)
MLTensor
public init(stacking tensors: some Collection<MLTensor>, alongAxis axis: Swift.Int = 0)
MLTensor
public init(arrayLiteral elements: CoreML.MLTensor...)
MLTensor
public init(_ elements: some Collection<MLTensor>, alongAxis axis: Swift.Int = 0)
MLTensor
public init<Scalar>(randomNormal shape: [Swift.Int], mean: Scalar = Scalar.init(0.0), standardDeviation: Scalar = Scalar.init(1.0), seed: Swift.UInt64? = nil, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.BinaryFloatingPoint
MLTensor
public init<Scalar>(randomUniform shape: [Swift.Int], in bounds: Swift.Range<Scalar> = 0..<1, seed: Swift.UInt64? = nil, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.BinaryFloatingPoint
MLTensor
public init<Scalar>(randomUniform shape: [Swift.Int], in bounds: Swift.ClosedRange<Scalar> = 0...1, seed: Swift.UInt64? = nil, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.BinaryInteger
MLTensor
public init(unsafeUninitializedShape shape: [Swift.Int], scalarType: any CoreML.MLTensorScalar.Type, initializingWith initializer: (Swift.UnsafeMutableRawBufferPointer) throws -> Swift.Void) rethrows
MLTensor
public init(shape: [Swift.Int], scalars: some Collection<Float>)
MLTensor
public init<Scalar>(shape: [Swift.Int], scalars: some Collection<Scalar>, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar
MLTensor
public init<Scalar>(_ value: Scalar, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar
MLTensor
public init<Scalar>(_ scalars: some Collection<Scalar>, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar
MLTensor
public init(_ scalars: some Collection<Float>)
MLTensor
public init(_ scalars: some Collection<Int32>)
MLTensor
public init(repeating repeatedValue: Swift.Float, shape: [Swift.Int])
MLTensor
public init<Scalar>(repeating repeatedValue: Scalar, shape: [Swift.Int], scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar
MLTensor
public init<Scalar>(zeros shape: [Swift.Int], scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.FixedWidthInteger
MLTensor
public init<Scalar>(zeros shape: [Swift.Int], scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.BinaryFloatingPoint, Scalar.RawSignificand : Swift.FixedWidthInteger
MLTensor
public init<Scalar>(ones shape: [Swift.Int], scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.FixedWidthInteger
MLTensor
public init<Scalar>(ones shape: [Swift.Int], scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.BinaryFloatingPoint, Scalar.RawSignificand : Swift.FixedWidthInteger
MLTensor
public init(rangeFrom start: Swift.Float, to end: Swift.Float, by stride: Swift.Float.Stride)
MLTensor
public init<Scalar>(rangeFrom start: Scalar, to end: Scalar, by stride: Scalar.Stride, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.Strideable
MLTensor
public init(linearSpaceFrom start: Swift.Float, through end: Swift.Float, count: Swift.Int)
MLTensor
public init<Scalar>(linearSpaceFrom start: Scalar, through end: Scalar, count: Swift.Int, scalarType: Scalar.Type = Scalar.self) where Scalar : CoreML.MLTensorScalar, Scalar : Swift.BinaryFloatingPoint
MLTensor
public init(floatLiteral: Swift.Float)
MLTensor
public init(integerLiteral: Swift.Int32)
MLTensor
public init(booleanLiteral: Swift.Bool)
MLTensor
public init<ShapedArray>(_ shapedArray: ShapedArray) where ShapedArray : CoreML.MLShapedArrayProtocol, ShapedArray.Scalar : CoreML.MLTensorScalar
MLTensor
public init(shape: [Swift.Int], data: Foundation.Data, scalarType: any CoreML.MLTensorScalar.Type)
MLTensor
public init(bytesNoCopy bytes: Swift.UnsafeRawBufferPointer, shape: [Swift.Int], scalarType: any CoreML.MLTensorScalar.Type, deallocator: Foundation.Data.Deallocator)
Creation
- (nonnull instancetype)initWithShape:(nonnull NSArray<NSNumber *> *)shape dataType:(MLMultiArrayDataType)dataType strides:(nonnull NSArray<NSNumber *> *)strides;