Documentation
¶
Overview ¶
Package coreml provides purego-based Go bindings for the macOS CoreML framework.
Apple documentation: https://developer.apple.com/documentation/coreml
Index ¶
- func MLAllComputeDevices() *foundation.NSArray[MLComputeDeviceProtocol]
- func MLComputePlanLoadContentsOfURLConfigurationCompletionHandler(url *foundation.NSURL, configuration *MLModelConfiguration, ...)
- func MLComputePlanLoadModelAssetConfigurationCompletionHandler(asset *MLModelAsset, configuration *MLModelConfiguration, ...)
- func MLFeatureValueImageOptionCropAndScale() *foundation.NSString
- func MLFeatureValueImageOptionCropRect() *foundation.NSString
- func MLModelAuthorKey() *foundation.NSString
- func MLModelAvailableComputeDevices() *foundation.NSArray[MLComputeDeviceProtocol]
- func MLModelCompileModelAtURLCompletionHandler(modelURL *foundation.NSURL, handler func(*foundation.NSURL, unsafe.Pointer))
- func MLModelCompileModelAtURLError(modelURL *foundation.NSURL) (*foundation.NSURL, error)
- func MLModelCreatorDefinedKey() *foundation.NSString
- func MLModelDescriptionKey() *foundation.NSString
- func MLModelErrorDomain() *foundation.NSString
- func MLModelLicenseKey() *foundation.NSString
- func MLModelLoadContentsOfURLConfigurationCompletionHandler(url *foundation.NSURL, configuration *MLModelConfiguration, ...)
- func MLModelLoadModelAssetConfigurationCompletionHandler(asset *MLModelAsset, configuration *MLModelConfiguration, ...)
- func MLModelStructureLoadContentsOfURLCompletionHandler(url *foundation.NSURL, handler func(*MLModelStructure, unsafe.Pointer))
- func MLModelStructureLoadModelAssetCompletionHandler(asset *MLModelAsset, handler func(*MLModelStructure, unsafe.Pointer))
- func MLModelVersionStringKey() *foundation.NSString
- func SymbolAvailable(symbol string) bool
- type Acl_entry_id_t
- type Acl_flag_t
- type Acl_perm_t
- type Acl_tag_t
- type Acl_type_t
- type Clockid_t
- type Dispatch_autorelease_frequency_t
- type Dispatch_block_flags_t
- type EvCmd
- type Filesec_property_t
- type Idtype_t
- type Ipc_info_object_type_t
- type Launch_data_type_t
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MLArrayBatchProvider
- func (o *MLArrayBatchProvider) Array() *foundation.NSArray[MLFeatureProvider]
- func (o *MLArrayBatchProvider) InitWithDictionaryError(dictionary *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLArrayBatchProvider, error)
- func (o *MLArrayBatchProvider) InitWithFeatureProviderArray(array *foundation.NSArray[MLFeatureProvider]) *MLArrayBatchProvider
- type MLBatchProvider
- type MLCPUComputeDevice
- type MLComputeDeviceProtocol
- type MLComputePlan
- func (o *MLComputePlan) ComputeDeviceUsageForMLProgramOperation(operation *MLModelStructureProgramOperation) *MLComputePlanDeviceUsage
- func (o *MLComputePlan) ComputeDeviceUsageForNeuralNetworkLayer(layer *MLModelStructureNeuralNetworkLayer) *MLComputePlanDeviceUsage
- func (o *MLComputePlan) EstimatedCostOfMLProgramOperation(operation *MLModelStructureProgramOperation) *MLComputePlanCost
- func (o *MLComputePlan) ModelStructure() *MLModelStructure
- type MLComputePlanCost
- type MLComputePlanDeviceUsage
- type MLComputeUnits
- type MLCustomLayer
- type MLCustomModel
- type MLDictionaryConstraint
- type MLDictionaryFeatureProvider
- func (o *MLDictionaryFeatureProvider) Dictionary() *foundation.NSDictionary[*foundation.NSString, *MLFeatureValue]
- func (o *MLDictionaryFeatureProvider) InitWithDictionaryError(dictionary *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLDictionaryFeatureProvider, error)
- func (o *MLDictionaryFeatureProvider) ObjectForKeyedSubscript(featureName *foundation.NSString) *MLFeatureValue
- type MLFeatureDescription
- func (o *MLFeatureDescription) DictionaryConstraint() *MLDictionaryConstraint
- func (o *MLFeatureDescription) ImageConstraint() *MLImageConstraint
- func (o *MLFeatureDescription) IsAllowedValue(value *MLFeatureValue) bool
- func (o *MLFeatureDescription) IsOptional() bool
- func (o *MLFeatureDescription) MultiArrayConstraint() *MLMultiArrayConstraint
- func (o *MLFeatureDescription) Name() *foundation.NSString
- func (o *MLFeatureDescription) SequenceConstraint() *MLSequenceConstraint
- func (o *MLFeatureDescription) StateConstraint() *MLStateConstraint
- func (o *MLFeatureDescription) Type() MLFeatureType
- type MLFeatureProvider
- type MLFeatureType
- type MLFeatureValue
- func MLFeatureValueFeatureValueWithCGImageConstraintOptionsError(cgImage unsafe.Pointer, constraint *MLImageConstraint, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithCGImageOrientationConstraintOptionsError(cgImage unsafe.Pointer, orientation imageio.CGImagePropertyOrientation, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithCGImageOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError(cgImage unsafe.Pointer, orientation imageio.CGImagePropertyOrientation, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptionsError(cgImage unsafe.Pointer, pixelsWide int, pixelsHigh int, pixelFormatType uint, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithDictionaryError(value *foundation.NSDictionary[objc.ID, *foundation.NSNumber]) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithDouble(value float64) *MLFeatureValue
- func MLFeatureValueFeatureValueWithImageAtURLConstraintOptionsError(url *foundation.NSURL, constraint *MLImageConstraint, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithImageAtURLOrientationConstraintOptionsError(url *foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithImageAtURLOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError(url *foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptionsError(url *foundation.NSURL, pixelsWide int, pixelsHigh int, pixelFormatType uint, ...) (*MLFeatureValue, error)
- func MLFeatureValueFeatureValueWithInt64(value int64) *MLFeatureValue
- func MLFeatureValueFeatureValueWithMultiArray(value *MLMultiArray) *MLFeatureValue
- func MLFeatureValueFeatureValueWithPixelBuffer(value unsafe.Pointer) *MLFeatureValue
- func MLFeatureValueFeatureValueWithSequence(sequence *MLSequence) *MLFeatureValue
- func MLFeatureValueFeatureValueWithString(value *foundation.NSString) *MLFeatureValue
- func MLFeatureValueFromID(id objc.ID) *MLFeatureValue
- func MLFeatureValueUndefinedFeatureValueWithType(type_ MLFeatureType) *MLFeatureValue
- func (o *MLFeatureValue) DictionaryValue() *foundation.NSDictionary[objc.ID, *foundation.NSNumber]
- func (o *MLFeatureValue) DoubleValue() float64
- func (o *MLFeatureValue) ImageBufferValue() unsafe.Pointer
- func (o *MLFeatureValue) Int64Value() int64
- func (o *MLFeatureValue) IsEqualToFeatureValue(value *MLFeatureValue) bool
- func (o *MLFeatureValue) IsUndefined() bool
- func (o *MLFeatureValue) MultiArrayValue() *MLMultiArray
- func (o *MLFeatureValue) SequenceValue() *MLSequence
- func (o *MLFeatureValue) StringValue() *foundation.NSString
- func (o *MLFeatureValue) Type() MLFeatureType
- type MLGPUComputeDevice
- type MLImageConstraint
- type MLImageSize
- type MLImageSizeConstraint
- type MLImageSizeConstraintType
- type MLKey
- type MLMetricKey
- type MLModel
- func (o *MLModel) Configuration() *MLModelConfiguration
- func (o *MLModel) ModelDescription() *MLModelDescription
- func (o *MLModel) NewState() *MLState
- func (o *MLModel) ParameterValueForKeyError(key *MLParameterKey) (objc.ID, error)
- func (o *MLModel) PredictionFromFeaturesCompletionHandler(input MLFeatureProvider, completionHandler func(objc.ID, unsafe.Pointer))
- func (o *MLModel) PredictionFromFeaturesError(input MLFeatureProvider) (MLFeatureProvider, error)
- func (o *MLModel) PredictionFromFeaturesOptionsCompletionHandler(input MLFeatureProvider, options *MLPredictionOptions, ...)
- func (o *MLModel) PredictionFromFeaturesOptionsError(input MLFeatureProvider, options *MLPredictionOptions) (MLFeatureProvider, error)
- func (o *MLModel) PredictionFromFeaturesUsingStateError(inputFeatures MLFeatureProvider, state *MLState) (MLFeatureProvider, error)
- func (o *MLModel) PredictionFromFeaturesUsingStateOptionsCompletionHandler(inputFeatures MLFeatureProvider, state *MLState, options *MLPredictionOptions, ...)
- func (o *MLModel) PredictionFromFeaturesUsingStateOptionsError(inputFeatures MLFeatureProvider, state *MLState, options *MLPredictionOptions) (MLFeatureProvider, error)
- func (o *MLModel) PredictionsFromBatchError(inputBatch MLBatchProvider) (MLBatchProvider, error)
- func (o *MLModel) PredictionsFromBatchOptionsError(inputBatch MLBatchProvider, options *MLPredictionOptions) (MLBatchProvider, error)
- type MLModelAsset
- func MLModelAssetFromID(id objc.ID) *MLModelAsset
- func MLModelAssetModelAssetWithSpecificationDataBlobMappingError(specificationData *foundation.NSData, ...) (*MLModelAsset, error)
- func MLModelAssetModelAssetWithSpecificationDataError(specificationData *foundation.NSData) (*MLModelAsset, error)
- func MLModelAssetModelAssetWithURLError(compiledModelURL *foundation.NSURL) (*MLModelAsset, error)
- func (o *MLModelAsset) FunctionNamesWithCompletionHandler(handler func(*foundation.NSArray[*foundation.NSString], unsafe.Pointer))
- func (o *MLModelAsset) ModelDescriptionOfFunctionNamedCompletionHandler(functionName *foundation.NSString, ...)
- func (o *MLModelAsset) ModelDescriptionWithCompletionHandler(handler func(*MLModelDescription, unsafe.Pointer))
- type MLModelConfiguration
- func (o *MLModelConfiguration) AllowLowPrecisionAccumulationOnGPU() bool
- func (o *MLModelConfiguration) ComputeUnits() MLComputeUnits
- func (o *MLModelConfiguration) FunctionName() *foundation.NSString
- func (o *MLModelConfiguration) ModelDisplayName() *foundation.NSString
- func (o *MLModelConfiguration) OptimizationHints() *MLOptimizationHints
- func (o *MLModelConfiguration) Parameters() *foundation.NSDictionary[*MLParameterKey, objc.ID]
- func (o *MLModelConfiguration) PreferredMetalDevice() metal.MTLDevice
- func (o *MLModelConfiguration) SetAllowLowPrecisionAccumulationOnGPU(allowLowPrecisionAccumulationOnGPU bool)
- func (o *MLModelConfiguration) SetComputeUnits(computeUnits MLComputeUnits)
- func (o *MLModelConfiguration) SetFunctionName(functionName *foundation.NSString)
- func (o *MLModelConfiguration) SetModelDisplayName(modelDisplayName *foundation.NSString)
- func (o *MLModelConfiguration) SetOptimizationHints(optimizationHints *MLOptimizationHints)
- func (o *MLModelConfiguration) SetParameters(parameters *foundation.NSDictionary[*MLParameterKey, objc.ID])
- func (o *MLModelConfiguration) SetPreferredMetalDevice(preferredMetalDevice metal.MTLDevice)
- type MLModelDescription
- func (o *MLModelDescription) ClassLabels() *foundation.NSArray[objc.ID]
- func (o *MLModelDescription) InputDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
- func (o *MLModelDescription) IsUpdatable() bool
- func (o *MLModelDescription) Metadata() *foundation.NSDictionary[*foundation.NSString, objc.ID]
- func (o *MLModelDescription) OutputDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
- func (o *MLModelDescription) ParameterDescriptionsByKey() *foundation.NSDictionary[*MLParameterKey, *MLParameterDescription]
- func (o *MLModelDescription) PredictedFeatureName() *foundation.NSString
- func (o *MLModelDescription) PredictedProbabilitiesName() *foundation.NSString
- func (o *MLModelDescription) StateDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
- func (o *MLModelDescription) TrainingInputDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
- type MLModelError
- type MLModelStructure
- type MLModelStructureNeuralNetwork
- type MLModelStructureNeuralNetworkLayer
- func (o *MLModelStructureNeuralNetworkLayer) InputNames() *foundation.NSArray[*foundation.NSString]
- func (o *MLModelStructureNeuralNetworkLayer) Name() *foundation.NSString
- func (o *MLModelStructureNeuralNetworkLayer) OutputNames() *foundation.NSArray[*foundation.NSString]
- func (o *MLModelStructureNeuralNetworkLayer) Type() *foundation.NSString
- type MLModelStructurePipeline
- type MLModelStructureProgram
- type MLModelStructureProgramArgument
- type MLModelStructureProgramBinding
- type MLModelStructureProgramBlock
- func (o *MLModelStructureProgramBlock) Inputs() *foundation.NSArray[*MLModelStructureProgramNamedValueType]
- func (o *MLModelStructureProgramBlock) Operations() *foundation.NSArray[*MLModelStructureProgramOperation]
- func (o *MLModelStructureProgramBlock) OutputNames() *foundation.NSArray[*foundation.NSString]
- type MLModelStructureProgramFunction
- type MLModelStructureProgramNamedValueType
- type MLModelStructureProgramOperation
- func (o *MLModelStructureProgramOperation) Blocks() *foundation.NSArray[*MLModelStructureProgramBlock]
- func (o *MLModelStructureProgramOperation) Inputs() ...
- func (o *MLModelStructureProgramOperation) OperatorName() *foundation.NSString
- func (o *MLModelStructureProgramOperation) Outputs() *foundation.NSArray[*MLModelStructureProgramNamedValueType]
- type MLModelStructureProgramValue
- type MLModelStructureProgramValueType
- type MLMultiArray
- func (o *MLMultiArray) Count() int
- func (o *MLMultiArray) DataPointer() unsafe.Pointer
- func (o *MLMultiArray) DataType() MLMultiArrayDataType
- func (o *MLMultiArray) GetBytesWithHandler(handler func(unsafe.Pointer, int))
- func (o *MLMultiArray) GetMutableBytesWithHandler(handler func(unsafe.Pointer, int, *foundation.NSArray[*foundation.NSNumber]))
- func (o *MLMultiArray) InitWithDataPointerShapeDataTypeStridesDeallocatorError(dataPointer unsafe.Pointer, shape *foundation.NSArray[*foundation.NSNumber], ...) (*MLMultiArray, error)
- func (o *MLMultiArray) InitWithPixelBufferShape(pixelBuffer unsafe.Pointer, shape *foundation.NSArray[*foundation.NSNumber]) *MLMultiArray
- func (o *MLMultiArray) InitWithShapeDataTypeError(shape *foundation.NSArray[*foundation.NSNumber], dataType MLMultiArrayDataType) (*MLMultiArray, error)
- func (o *MLMultiArray) InitWithShapeDataTypeStrides(shape *foundation.NSArray[*foundation.NSNumber], dataType MLMultiArrayDataType, ...) *MLMultiArray
- func (o *MLMultiArray) ObjectAtIndexedSubscript(idx int) *foundation.NSNumber
- func (o *MLMultiArray) ObjectForKeyedSubscript(key *foundation.NSArray[*foundation.NSNumber]) *foundation.NSNumber
- func (o *MLMultiArray) PixelBuffer() unsafe.Pointer
- func (o *MLMultiArray) SetObjectAtIndexedSubscript(obj *foundation.NSNumber, idx int)
- func (o *MLMultiArray) SetObjectForKeyedSubscript(obj *foundation.NSNumber, key *foundation.NSArray[*foundation.NSNumber])
- func (o *MLMultiArray) Shape() *foundation.NSArray[*foundation.NSNumber]
- func (o *MLMultiArray) Strides() *foundation.NSArray[*foundation.NSNumber]
- func (o *MLMultiArray) TransferToMultiArray(destinationMultiArray *MLMultiArray)
- type MLMultiArrayConstraint
- type MLMultiArrayDataType
- type MLMultiArrayShapeConstraint
- type MLMultiArrayShapeConstraintType
- type MLNeuralEngineComputeDevice
- type MLNumericConstraint
- type MLOptimizationHints
- func (o *MLOptimizationHints) ReshapeFrequency() MLReshapeFrequencyHint
- func (o *MLOptimizationHints) SetReshapeFrequency(reshapeFrequency MLReshapeFrequencyHint)
- func (o *MLOptimizationHints) SetSpecializationStrategy(specializationStrategy MLSpecializationStrategy)
- func (o *MLOptimizationHints) SpecializationStrategy() MLSpecializationStrategy
- type MLParameterDescription
- type MLParameterKey
- func MLParameterKeyBeta1() *MLParameterKey
- func MLParameterKeyBeta2() *MLParameterKey
- func MLParameterKeyBiases() *MLParameterKey
- func MLParameterKeyEpochs() *MLParameterKey
- func MLParameterKeyEps() *MLParameterKey
- func MLParameterKeyFromID(id objc.ID) *MLParameterKey
- func MLParameterKeyLearningRate() *MLParameterKey
- func MLParameterKeyLinkedModelFileName() *MLParameterKey
- func MLParameterKeyLinkedModelSearchPath() *MLParameterKey
- func MLParameterKeyMiniBatchSize() *MLParameterKey
- func MLParameterKeyMomentum() *MLParameterKey
- func MLParameterKeyNumberOfNeighbors() *MLParameterKey
- func MLParameterKeySeed() *MLParameterKey
- func MLParameterKeyShuffle() *MLParameterKey
- func MLParameterKeyWeights() *MLParameterKey
- type MLPredictionOptions
- func (o *MLPredictionOptions) OutputBackings() *foundation.NSDictionary[*foundation.NSString, objc.ID]
- func (o *MLPredictionOptions) SetOutputBackings(outputBackings *foundation.NSDictionary[*foundation.NSString, objc.ID])
- func (o *MLPredictionOptions) SetUsesCPUOnly(usesCPUOnly bool)deprecated
- func (o *MLPredictionOptions) UsesCPUOnly() bool
- type MLReshapeFrequencyHint
- type MLSequence
- func MLSequenceEmptySequenceWithType(type_ MLFeatureType) *MLSequence
- func MLSequenceFromID(id objc.ID) *MLSequence
- func MLSequenceSequenceWithInt64Array(int64Values *foundation.NSArray[*foundation.NSNumber]) *MLSequence
- func MLSequenceSequenceWithStringArray(stringValues *foundation.NSArray[*foundation.NSString]) *MLSequence
- type MLSequenceConstraint
- type MLSpecializationStrategy
- type MLState
- type MLStateConstraint
- type MLTask
- type MLTaskState
- type MLUpdateContext
- func (o *MLUpdateContext) Event() MLUpdateProgressEvent
- func (o *MLUpdateContext) Metrics() *foundation.NSDictionary[*MLMetricKey, objc.ID]
- func (o *MLUpdateContext) Model() *MLModel
- func (o *MLUpdateContext) Parameters() *foundation.NSDictionary[*MLParameterKey, objc.ID]
- func (o *MLUpdateContext) Task() *MLUpdateTask
- type MLUpdateProgressEvent
- type MLUpdateProgressHandlers
- type MLUpdateTask
- func MLUpdateTaskFromID(id objc.ID) *MLUpdateTask
- func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataCompletionHandlerError(modelURL *foundation.NSURL, trainingData MLBatchProvider, ...) (*MLUpdateTask, error)
- func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataConfigurationCompletionHandlerError(modelURL *foundation.NSURL, trainingData MLBatchProvider, ...) (*MLUpdateTask, error)
- func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataConfigurationProgressHandlersError(modelURL *foundation.NSURL, trainingData MLBatchProvider, ...) (*MLUpdateTask, error)
- func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataProgressHandlersError(modelURL *foundation.NSURL, trainingData MLBatchProvider, ...) (*MLUpdateTask, error)
- type MLWritable
- type MTLCommandBuffer
- type MTLDevice
- type MTLTexture
- type Mach_vm_range_flags_t
- type Mach_vm_range_flavor_t
- type Mach_vm_range_tag_t
- type Mpo_flags_t
- type NXMouseButton
- type Os_clockid_t
- type PMPageToPaperMappingType
- type Ptrauth_key
- type Qos_class_t
- type Virtual_memory_guard_exception_code_t
- type Xpc_listener_create_flags_t
- type Xpc_session_create_flags_t
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MLAllComputeDevices ¶
func MLAllComputeDevices() *foundation.NSArray[MLComputeDeviceProtocol]
@abstract Returns an array containing all compute devices. @discussion The returned array contains all compute devices that are accessible. If a compute device becomes inaccessible for some reason (for e.g. if an external GPU is unplugged) then the subsequent call to`MLAllComputeDevices` will return an array without the compute device.
func MLComputePlanLoadContentsOfURLConfigurationCompletionHandler ¶
func MLComputePlanLoadContentsOfURLConfigurationCompletionHandler(url *foundation.NSURL, configuration *MLModelConfiguration, handler func(*MLComputePlan, unsafe.Pointer))
Construct the compute plan of a model asynchronously given the location of its on-disk representation. @param url The location of its on-disk representation (.mlmodelc directory). @param configuration The model configuration. @param handler When the compute plan is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLComputePlan instance or NSError object.
func MLComputePlanLoadModelAssetConfigurationCompletionHandler ¶
func MLComputePlanLoadModelAssetConfigurationCompletionHandler(asset *MLModelAsset, configuration *MLModelConfiguration, handler func(*MLComputePlan, unsafe.Pointer))
Construct the compute plan of a model asynchronously given the model asset. @param asset The model asset. @param configuration The model configuration. @param handler When the compute plan is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLComputePlan instance or NSError object.
func MLFeatureValueImageOptionCropAndScale ¶
func MLFeatureValueImageOptionCropAndScale() *foundation.NSString
Key for VNImageCropAndScaleOption describing how to crop and scale the image (or region of interest) to the desired size
func MLFeatureValueImageOptionCropRect ¶
func MLFeatureValueImageOptionCropRect() *foundation.NSString
Key for CGRect describing a crop region of interest of image source in normalized coordinates
func MLModelAvailableComputeDevices ¶
func MLModelAvailableComputeDevices() *foundation.NSArray[MLComputeDeviceProtocol]
func MLModelCompileModelAtURLCompletionHandler ¶
func MLModelCompileModelAtURLCompletionHandler(modelURL *foundation.NSURL, handler func(*foundation.NSURL, unsafe.Pointer))
func MLModelCompileModelAtURLError ¶
func MLModelCompileModelAtURLError(modelURL *foundation.NSURL) (*foundation.NSURL, error)
Compile a .mlmodel for this device @param modelURL URL file path to .mlmodel file you wish to compile @param error Any errors are surfaced here @returns a URL to the compiled .mlmodelc directory if successful The model is compiled to a temporary location on disk You must move the compiled model to a permanent location if you wish to keep it @discussion The returned model can be loaded using: @code [MLModel modelWithContentsOfURL:error:] @endcode
func MLModelCreatorDefinedKey ¶
func MLModelCreatorDefinedKey() *foundation.NSString
Any additional pertinent information specified by the model creator
func MLModelDescriptionKey ¶
func MLModelDescriptionKey() *foundation.NSString
A short description of what the model does and/or its purpose
func MLModelErrorDomain ¶
func MLModelErrorDomain() *foundation.NSString
func MLModelLicenseKey ¶
func MLModelLicenseKey() *foundation.NSString
License information for the model
func MLModelLoadContentsOfURLConfigurationCompletionHandler ¶
func MLModelLoadContentsOfURLConfigurationCompletionHandler(url *foundation.NSURL, configuration *MLModelConfiguration, handler func(*MLModel, unsafe.Pointer))
Creates a Core ML model instance asynchronously from a compiled model file, a custom configuration, and a completion handler.
func MLModelLoadModelAssetConfigurationCompletionHandler ¶
func MLModelLoadModelAssetConfigurationCompletionHandler(asset *MLModelAsset, configuration *MLModelConfiguration, handler func(*MLModel, unsafe.Pointer))
Construct a model asynchronously from a compiled model asset.
func MLModelStructureLoadContentsOfURLCompletionHandler ¶
func MLModelStructureLoadContentsOfURLCompletionHandler(url *foundation.NSURL, handler func(*MLModelStructure, unsafe.Pointer))
Construct the model structure asynchronously given the location of its on-disk representation. @param url The location of its on-disk representation (.mlmodelc directory). @param handler When the model structure is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLModelStructure instance or NSError object.
func MLModelStructureLoadModelAssetCompletionHandler ¶
func MLModelStructureLoadModelAssetCompletionHandler(asset *MLModelAsset, handler func(*MLModelStructure, unsafe.Pointer))
Construct the model structure asynchronously given the model asset. @param asset The model asset. @param handler When the model structure is constructed successfully or unsuccessfully, the completion handler is invoked with a valid MLModelStructure instance or NSError object.
func MLModelVersionStringKey ¶
func MLModelVersionStringKey() *foundation.NSString
A version number encoded as a string
func SymbolAvailable ¶
SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.
Types ¶
type Acl_entry_id_t ¶
type Acl_entry_id_t int64
const ( ACL_FIRST_ENTRY Acl_entry_id_t = 0 ACL_NEXT_ENTRY Acl_entry_id_t = -1 ACL_LAST_ENTRY Acl_entry_id_t = -2 )
func (Acl_entry_id_t) String ¶
func (e Acl_entry_id_t) String() string
type Acl_flag_t ¶
type Acl_flag_t int64
const ( ACL_FLAG_DEFER_INHERIT Acl_flag_t = 1 ACL_FLAG_NO_INHERIT Acl_flag_t = 131072 ACL_ENTRY_INHERITED Acl_flag_t = 16 ACL_ENTRY_FILE_INHERIT Acl_flag_t = 32 ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64 ACL_ENTRY_LIMIT_INHERIT Acl_flag_t = 128 ACL_ENTRY_ONLY_INHERIT Acl_flag_t = 256 )
func (Acl_flag_t) String ¶
func (e Acl_flag_t) String() string
type Acl_perm_t ¶
type Acl_perm_t int64
const ( ACL_READ_DATA Acl_perm_t = 2 ACL_LIST_DIRECTORY Acl_perm_t = 2 ACL_WRITE_DATA Acl_perm_t = 4 ACL_ADD_FILE Acl_perm_t = 4 ACL_EXECUTE Acl_perm_t = 8 ACL_SEARCH Acl_perm_t = 8 ACL_DELETE Acl_perm_t = 16 ACL_APPEND_DATA Acl_perm_t = 32 ACL_ADD_SUBDIRECTORY Acl_perm_t = 32 ACL_DELETE_CHILD Acl_perm_t = 64 ACL_READ_ATTRIBUTES Acl_perm_t = 128 ACL_WRITE_ATTRIBUTES Acl_perm_t = 256 ACL_READ_EXTATTRIBUTES Acl_perm_t = 512 ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024 ACL_READ_SECURITY Acl_perm_t = 2048 ACL_WRITE_SECURITY Acl_perm_t = 4096 ACL_CHANGE_OWNER Acl_perm_t = 8192 ACL_SYNCHRONIZE Acl_perm_t = 1048576 )
func (Acl_perm_t) String ¶
func (e Acl_perm_t) String() string
type Acl_type_t ¶
type Acl_type_t int64
const ( ACL_TYPE_EXTENDED Acl_type_t = 256 ACL_TYPE_ACCESS Acl_type_t = 0 ACL_TYPE_DEFAULT Acl_type_t = 1 ACL_TYPE_AFS Acl_type_t = 2 ACL_TYPE_CODA Acl_type_t = 3 ACL_TYPE_NTFS Acl_type_t = 4 ACL_TYPE_NWFS Acl_type_t = 5 )
func (Acl_type_t) String ¶
func (e Acl_type_t) String() string
type Dispatch_autorelease_frequency_t ¶
type Dispatch_autorelease_frequency_t uint64
const ( DISPATCH_AUTORELEASE_FREQUENCY_INHERIT Dispatch_autorelease_frequency_t = 0 DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1 DISPATCH_AUTORELEASE_FREQUENCY_NEVER Dispatch_autorelease_frequency_t = 2 )
func (Dispatch_autorelease_frequency_t) String ¶
func (e Dispatch_autorelease_frequency_t) String() string
type Dispatch_block_flags_t ¶
type Dispatch_block_flags_t uint64
const ( DISPATCH_BLOCK_BARRIER Dispatch_block_flags_t = 1 DISPATCH_BLOCK_DETACHED Dispatch_block_flags_t = 2 DISPATCH_BLOCK_ASSIGN_CURRENT Dispatch_block_flags_t = 4 DISPATCH_BLOCK_NO_QOS_CLASS Dispatch_block_flags_t = 8 DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16 DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32 )
func (Dispatch_block_flags_t) String ¶
func (e Dispatch_block_flags_t) String() string
type Filesec_property_t ¶
type Filesec_property_t int64
const ( FILESEC_OWNER Filesec_property_t = 1 FILESEC_GROUP Filesec_property_t = 2 FILESEC_UUID Filesec_property_t = 3 FILESEC_MODE Filesec_property_t = 4 FILESEC_ACL Filesec_property_t = 5 FILESEC_GRPUUID Filesec_property_t = 6 FILESEC_ACL_RAW Filesec_property_t = 100 FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101 )
func (Filesec_property_t) String ¶
func (e Filesec_property_t) String() string
type Ipc_info_object_type_t ¶
type Ipc_info_object_type_t int64
const ( IPC_OTYPE_NONE Ipc_info_object_type_t = 0 IPC_OTYPE_THREAD_CONTROL Ipc_info_object_type_t = 1 IPC_OTYPE_TASK_CONTROL Ipc_info_object_type_t = 2 IPC_OTYPE_HOST Ipc_info_object_type_t = 3 IPC_OTYPE_HOST_PRIV Ipc_info_object_type_t = 4 IPC_OTYPE_PROCESSOR Ipc_info_object_type_t = 5 IPC_OTYPE_PROCESSOR_SET Ipc_info_object_type_t = 6 IPC_OTYPE_PROCESSOR_SET_NAME Ipc_info_object_type_t = 7 IPC_OTYPE_TIMER Ipc_info_object_type_t = 8 IPC_OTYPE_PORT_SUBST_ONCE Ipc_info_object_type_t = 9 IPC_OTYPE_MIG Ipc_info_object_type_t = 10 IPC_OTYPE_MEMORY_OBJECT Ipc_info_object_type_t = 11 IPC_OTYPE_XMM_PAGER Ipc_info_object_type_t = 12 IPC_OTYPE_XMM_KERNEL Ipc_info_object_type_t = 13 IPC_OTYPE_XMM_REPLY Ipc_info_object_type_t = 14 IPC_OTYPE_UND_REPLY Ipc_info_object_type_t = 15 IPC_OTYPE_HOST_NOTIFY Ipc_info_object_type_t = 16 IPC_OTYPE_HOST_SECURITY Ipc_info_object_type_t = 17 IPC_OTYPE_LEDGER Ipc_info_object_type_t = 18 IPC_OTYPE_MAIN_DEVICE Ipc_info_object_type_t = 19 IPC_OTYPE_TASK_NAME Ipc_info_object_type_t = 20 IPC_OTYPE_SUBSYSTEM Ipc_info_object_type_t = 21 IPC_OTYPE_IO_DONE_QUEUE Ipc_info_object_type_t = 22 IPC_OTYPE_SEMAPHORE Ipc_info_object_type_t = 23 IPC_OTYPE_LOCK_SET Ipc_info_object_type_t = 24 IPC_OTYPE_CLOCK Ipc_info_object_type_t = 25 IPC_OTYPE_CLOCK_CTRL Ipc_info_object_type_t = 26 IPC_OTYPE_IOKIT_IDENT Ipc_info_object_type_t = 27 IPC_OTYPE_NAMED_ENTRY Ipc_info_object_type_t = 28 IPC_OTYPE_IOKIT_CONNECT Ipc_info_object_type_t = 29 IPC_OTYPE_IOKIT_OBJECT Ipc_info_object_type_t = 30 IPC_OTYPE_UPL Ipc_info_object_type_t = 31 IPC_OTYPE_MEM_OBJ_CONTROL Ipc_info_object_type_t = 32 IPC_OTYPE_AU_SESSIONPORT Ipc_info_object_type_t = 33 IPC_OTYPE_FILEPORT Ipc_info_object_type_t = 34 IPC_OTYPE_LABELH Ipc_info_object_type_t = 35 IPC_OTYPE_TASK_RESUME Ipc_info_object_type_t = 36 IPC_OTYPE_VOUCHER Ipc_info_object_type_t = 37 IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38 IPC_OTYPE_WORK_INTERVAL Ipc_info_object_type_t = 39 IPC_OTYPE_UX_HANDLER Ipc_info_object_type_t = 40 IPC_OTYPE_UEXT_OBJECT Ipc_info_object_type_t = 41 IPC_OTYPE_ARCADE_REG Ipc_info_object_type_t = 42 IPC_OTYPE_EVENTLINK Ipc_info_object_type_t = 43 IPC_OTYPE_TASK_INSPECT Ipc_info_object_type_t = 44 IPC_OTYPE_TASK_READ Ipc_info_object_type_t = 45 IPC_OTYPE_THREAD_INSPECT Ipc_info_object_type_t = 46 IPC_OTYPE_THREAD_READ Ipc_info_object_type_t = 47 IPC_OTYPE_SUID_CRED Ipc_info_object_type_t = 48 IPC_OTYPE_HYPERVISOR Ipc_info_object_type_t = 49 IPC_OTYPE_TASK_ID_TOKEN Ipc_info_object_type_t = 50 IPC_OTYPE_TASK_FATAL Ipc_info_object_type_t = 51 IPC_OTYPE_KCDATA Ipc_info_object_type_t = 52 IPC_OTYPE_EXCLAVES_RESOURCE Ipc_info_object_type_t = 53 IPC_OTYPE_THREAD_RESUME Ipc_info_object_type_t = 54 IPC_OTYPE_UNKNOWN Ipc_info_object_type_t = 4294967295 )
func (Ipc_info_object_type_t) String ¶
func (e Ipc_info_object_type_t) String() string
type Launch_data_type_t ¶
type Launch_data_type_t int64
const ( LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1 LAUNCH_DATA_ARRAY Launch_data_type_t = 2 LAUNCH_DATA_FD Launch_data_type_t = 3 LAUNCH_DATA_INTEGER Launch_data_type_t = 4 LAUNCH_DATA_REAL Launch_data_type_t = 5 LAUNCH_DATA_BOOL Launch_data_type_t = 6 LAUNCH_DATA_STRING Launch_data_type_t = 7 LAUNCH_DATA_OPAQUE Launch_data_type_t = 8 LAUNCH_DATA_ERRNO Launch_data_type_t = 9 LAUNCH_DATA_MACHPORT Launch_data_type_t = 10 )
func (Launch_data_type_t) String ¶
func (e Launch_data_type_t) String() string
type MDLabelDomain ¶
type MDLabelDomain int64
@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int64
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int64
@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
type MLArrayBatchProvider ¶
type MLArrayBatchProvider struct {
foundation.NSObject
}
A convenience wrapper for batches of feature providers.
Apple documentation: https://developer.apple.com/documentation/coreml/mlarraybatchprovider
func MLArrayBatchProviderFromID ¶
func MLArrayBatchProviderFromID(id objc.ID) *MLArrayBatchProvider
func (*MLArrayBatchProvider) Array ¶
func (o *MLArrayBatchProvider) Array() *foundation.NSArray[MLFeatureProvider]
func (*MLArrayBatchProvider) InitWithDictionaryError ¶
func (o *MLArrayBatchProvider) InitWithDictionaryError(dictionary *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLArrayBatchProvider, error)
Creates a batch provider based on feature names and their associated arrays of data.
func (*MLArrayBatchProvider) InitWithFeatureProviderArray ¶
func (o *MLArrayBatchProvider) InitWithFeatureProviderArray(array *foundation.NSArray[MLFeatureProvider]) *MLArrayBatchProvider
Creates the batch provider based on the array of feature providers.
type MLBatchProvider ¶
type MLBatchProvider interface {
FeaturesAtIndex(index int) MLFeatureProvider
Count() int
}
MLBatchProvider wraps the ObjC protocol MLBatchProvider.
type MLCPUComputeDevice ¶
type MLCPUComputeDevice struct {
foundation.NSObject
}
An object that represents a CPU compute device.
Apple documentation: https://developer.apple.com/documentation/coreml/mlcpucomputedevice
func MLCPUComputeDeviceFromID ¶
func MLCPUComputeDeviceFromID(id objc.ID) *MLCPUComputeDevice
type MLComputeDeviceProtocol ¶
type MLComputeDeviceProtocol interface {
}
MLComputeDeviceProtocol wraps the ObjC protocol MLComputeDeviceProtocol.
type MLComputePlan ¶
type MLComputePlan struct {
foundation.NSObject
}
A class representing the compute plan of a model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlcomputeplan
func MLComputePlanFromID ¶
func MLComputePlanFromID(id objc.ID) *MLComputePlan
func (*MLComputePlan) ComputeDeviceUsageForMLProgramOperation ¶
func (o *MLComputePlan) ComputeDeviceUsageForMLProgramOperation(operation *MLModelStructureProgramOperation) *MLComputePlanDeviceUsage
Returns The anticipated compute devices that would be used for executing an ML Program operation. @param operation An ML Program operation. @returns The anticipated compute devices that would be used for executing the operation or `nil`if the usage couldn't be determined.
func (*MLComputePlan) ComputeDeviceUsageForNeuralNetworkLayer ¶
func (o *MLComputePlan) ComputeDeviceUsageForNeuralNetworkLayer(layer *MLModelStructureNeuralNetworkLayer) *MLComputePlanDeviceUsage
Returns the anticipated compute devices that would be used for executing a NeuralNetwork layer. @param layer A NeuralNetwork layer. @returns The anticipated compute devices that would be used for executing the layer or `nil` if the usage couldn't be determined.
func (*MLComputePlan) EstimatedCostOfMLProgramOperation ¶
func (o *MLComputePlan) EstimatedCostOfMLProgramOperation(operation *MLModelStructureProgramOperation) *MLComputePlanCost
Returns the estimated cost of executing an ML Program operation. @param operation An ML Program operation. @returns The estimated cost of executing the operation or nil if the cost couldn't be estimated.
func (*MLComputePlan) ModelStructure ¶
func (o *MLComputePlan) ModelStructure() *MLModelStructure
type MLComputePlanCost ¶
type MLComputePlanCost struct {
foundation.NSObject
}
A class that represents the estimated cost of executing a layer or operation.
Apple documentation: https://developer.apple.com/documentation/coreml/mlcomputeplancost
func MLComputePlanCostFromID ¶
func MLComputePlanCostFromID(id objc.ID) *MLComputePlanCost
func (*MLComputePlanCost) Weight ¶
func (o *MLComputePlanCost) Weight() float64
type MLComputePlanDeviceUsage ¶
type MLComputePlanDeviceUsage struct {
foundation.NSObject
}
The anticipated compute devices to use for executing a layer or operation.
Apple documentation: https://developer.apple.com/documentation/coreml/mlcomputeplandeviceusage
func MLComputePlanDeviceUsageFromID ¶
func MLComputePlanDeviceUsageFromID(id objc.ID) *MLComputePlanDeviceUsage
func (*MLComputePlanDeviceUsage) PreferredComputeDevice ¶
func (o *MLComputePlanDeviceUsage) PreferredComputeDevice() MLComputeDeviceProtocol
The compute device that the framework prefers to execute the layer/operation.
func (*MLComputePlanDeviceUsage) SupportedComputeDevices ¶
func (o *MLComputePlanDeviceUsage) SupportedComputeDevices() *foundation.NSArray[MLComputeDeviceProtocol]
The compute devices that can execute the layer/operation.
type MLComputeUnits ¶
type MLComputeUnits int64
The set of processing-unit configurations the model can use to make predictions.
const ( // The option you choose to limit the model to only use the CPU. MLComputeUnitsCPUOnly MLComputeUnits = 0 // The option you choose to allow the model to use both the CPU and GPU, but not the neural engine. MLComputeUnitsCPUAndGPU MLComputeUnits = 1 // The option you choose to allow the model to use all compute units available, including the neural engine. MLComputeUnitsAll MLComputeUnits = 2 // The option you choose to allow the model to use both the CPU and neural engine, but not the GPU. MLComputeUnitsCPUAndNeuralEngine MLComputeUnits = 3 )
func (MLComputeUnits) String ¶
func (e MLComputeUnits) String() string
type MLCustomLayer ¶
type MLCustomLayer interface {
InitWithParameterDictionaryError(parameters *foundation.NSDictionary[*foundation.NSString, objc.ID]) (unsafe.Pointer, error)
SetWeightDataError(weights *foundation.NSArray[*foundation.NSData]) (bool, error)
OutputShapesForInputShapesError(inputShapes *foundation.NSArray[objc.ID]) (*foundation.NSArray[objc.ID], error)
EvaluateOnCPUWithInputsOutputsError(inputs *foundation.NSArray[*MLMultiArray], outputs *foundation.NSArray[*MLMultiArray]) (bool, error)
}
MLCustomLayer wraps the ObjC protocol MLCustomLayer.
type MLCustomModel ¶
type MLCustomModel interface {
InitWithModelDescriptionParameterDictionaryError(modelDescription *MLModelDescription, parameters *foundation.NSDictionary[*foundation.NSString, objc.ID]) (unsafe.Pointer, error)
PredictionFromFeaturesOptionsError(input MLFeatureProvider, options *MLPredictionOptions) (MLFeatureProvider, error)
}
MLCustomModel wraps the ObjC protocol MLCustomModel.
type MLDictionaryConstraint ¶
type MLDictionaryConstraint struct {
foundation.NSObject
}
The constraint on the keys for a dictionary feature.
Apple documentation: https://developer.apple.com/documentation/coreml/mldictionaryconstraint
func MLDictionaryConstraintFromID ¶
func MLDictionaryConstraintFromID(id objc.ID) *MLDictionaryConstraint
func (*MLDictionaryConstraint) KeyType ¶
func (o *MLDictionaryConstraint) KeyType() MLFeatureType
type MLDictionaryFeatureProvider ¶
type MLDictionaryFeatureProvider struct {
foundation.NSObject
}
A convenience wrapper for the given dictionary of data.
Apple documentation: https://developer.apple.com/documentation/coreml/mldictionaryfeatureprovider
func MLDictionaryFeatureProviderFromID ¶
func MLDictionaryFeatureProviderFromID(id objc.ID) *MLDictionaryFeatureProvider
func (*MLDictionaryFeatureProvider) Dictionary ¶
func (o *MLDictionaryFeatureProvider) Dictionary() *foundation.NSDictionary[*foundation.NSString, *MLFeatureValue]
Dictionary holding the feature values
func (*MLDictionaryFeatureProvider) InitWithDictionaryError ¶
func (o *MLDictionaryFeatureProvider) InitWithDictionaryError(dictionary *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLDictionaryFeatureProvider, error)
Creates the feature provider based on a dictionary.
func (*MLDictionaryFeatureProvider) ObjectForKeyedSubscript ¶
func (o *MLDictionaryFeatureProvider) ObjectForKeyedSubscript(featureName *foundation.NSString) *MLFeatureValue
Subscript interface for the feature provider to pass through to the dictionary.
type MLFeatureDescription ¶
type MLFeatureDescription struct {
foundation.NSObject
}
The name, type, and constraints of an input or output feature.
Apple documentation: https://developer.apple.com/documentation/coreml/mlfeaturedescription
func MLFeatureDescriptionFromID ¶
func MLFeatureDescriptionFromID(id objc.ID) *MLFeatureDescription
func (*MLFeatureDescription) DictionaryConstraint ¶
func (o *MLFeatureDescription) DictionaryConstraint() *MLDictionaryConstraint
Constraint when type == MLFeatureTypeDictionary, nil otherwise
func (*MLFeatureDescription) ImageConstraint ¶
func (o *MLFeatureDescription) ImageConstraint() *MLImageConstraint
Constraint when type == MLFeatureTypeImage, nil otherwise
func (*MLFeatureDescription) IsAllowedValue ¶
func (o *MLFeatureDescription) IsAllowedValue(value *MLFeatureValue) bool
Checks whether the model will accept an input feature value.
func (*MLFeatureDescription) IsOptional ¶
func (o *MLFeatureDescription) IsOptional() bool
Whether this feature can take an undefined value or not
func (*MLFeatureDescription) MultiArrayConstraint ¶
func (o *MLFeatureDescription) MultiArrayConstraint() *MLMultiArrayConstraint
Constraint when type == MLFeatureTypeMultiArray, nil otherwise
func (*MLFeatureDescription) Name ¶
func (o *MLFeatureDescription) Name() *foundation.NSString
Name of feature
func (*MLFeatureDescription) SequenceConstraint ¶
func (o *MLFeatureDescription) SequenceConstraint() *MLSequenceConstraint
Constraint when type == MLFeatureTypeSequence, nil otherwise
func (*MLFeatureDescription) StateConstraint ¶
func (o *MLFeatureDescription) StateConstraint() *MLStateConstraint
The state feature value constraint. The property has a value when `.type == MLFeatureTypeState`.
func (*MLFeatureDescription) Type ¶
func (o *MLFeatureDescription) Type() MLFeatureType
Type of data
type MLFeatureProvider ¶
type MLFeatureProvider interface {
}
MLFeatureProvider wraps the ObjC protocol MLFeatureProvider.
type MLFeatureType ¶
type MLFeatureType int64
The possible types for feature values, input features, and output features.
const ( // The type for invalid feature values. MLFeatureTypeInvalid MLFeatureType = 0 // The type for integer features and feature values. MLFeatureTypeInt64 MLFeatureType = 1 // The type for double features and feature values. MLFeatureTypeDouble MLFeatureType = 2 // The type for string features and feature values. MLFeatureTypeString MLFeatureType = 3 // The type for image features and feature values. MLFeatureTypeImage MLFeatureType = 4 // The type for multidimensional array features and feature values. MLFeatureTypeMultiArray MLFeatureType = 5 // The type for dictionary features and feature values. MLFeatureTypeDictionary MLFeatureType = 6 // The type for sequence features and feature values. MLFeatureTypeSequence MLFeatureType = 7 // MLState. Represents a model state that may be updated in each inference. MLFeatureTypeState MLFeatureType = 8 )
func (MLFeatureType) String ¶
func (e MLFeatureType) String() string
type MLFeatureValue ¶
type MLFeatureValue struct {
foundation.NSObject
}
A generic wrapper around an underlying value and the value’s type.
Apple documentation: https://developer.apple.com/documentation/coreml/mlfeaturevalue
func MLFeatureValueFeatureValueWithCGImageConstraintOptionsError ¶
func MLFeatureValueFeatureValueWithCGImageConstraintOptionsError(cgImage unsafe.Pointer, constraint *MLImageConstraint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from CGImage, using the size and type information required by feature description (orientation is assumed to be kCGImagePropertyOrientationUp)
func MLFeatureValueFeatureValueWithCGImageOrientationConstraintOptionsError ¶
func MLFeatureValueFeatureValueWithCGImageOrientationConstraintOptionsError(cgImage unsafe.Pointer, orientation imageio.CGImagePropertyOrientation, constraint *MLImageConstraint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from CGImage w/ specified orientation, using the size and type information required by feature description
func MLFeatureValueFeatureValueWithCGImageOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError ¶
func MLFeatureValueFeatureValueWithCGImageOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError(cgImage unsafe.Pointer, orientation imageio.CGImagePropertyOrientation, pixelsWide int, pixelsHigh int, pixelFormatType uint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from CGImage w/ specified orientation
func MLFeatureValueFeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptionsError ¶
func MLFeatureValueFeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptionsError(cgImage unsafe.Pointer, pixelsWide int, pixelsHigh int, pixelFormatType uint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from CGImage (orientation is assumed to be kCGImagePropertyOrientationUp)
func MLFeatureValueFeatureValueWithDictionaryError ¶
func MLFeatureValueFeatureValueWithDictionaryError(value *foundation.NSDictionary[objc.ID, *foundation.NSNumber]) (*MLFeatureValue, error)
Creates a feature value that contains a dictionary of numbers.
func MLFeatureValueFeatureValueWithDouble ¶
func MLFeatureValueFeatureValueWithDouble(value float64) *MLFeatureValue
Creates a feature value that contains a double.
func MLFeatureValueFeatureValueWithImageAtURLConstraintOptionsError ¶
func MLFeatureValueFeatureValueWithImageAtURLConstraintOptionsError(url *foundation.NSURL, constraint *MLImageConstraint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from an image on disk, using a model specified image constraint. Orientation is read from Exif if avaiable
func MLFeatureValueFeatureValueWithImageAtURLOrientationConstraintOptionsError ¶
func MLFeatureValueFeatureValueWithImageAtURLOrientationConstraintOptionsError(url *foundation.NSURL, orientation imageio.CGImagePropertyOrientation, constraint *MLImageConstraint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from an image on disk using a model specified image constraint. The passed in orientation supersedes any in the file
func MLFeatureValueFeatureValueWithImageAtURLOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError ¶
func MLFeatureValueFeatureValueWithImageAtURLOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError(url *foundation.NSURL, orientation imageio.CGImagePropertyOrientation, pixelsWide int, pixelsHigh int, pixelFormatType uint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from an image on disk. The passed in orientation supersedes any in the file
func MLFeatureValueFeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptionsError ¶
func MLFeatureValueFeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptionsError(url *foundation.NSURL, pixelsWide int, pixelsHigh int, pixelFormatType uint, options *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*MLFeatureValue, error)
Construct image feature value from an image on disk. Orientation is read from Exif if avaiable
func MLFeatureValueFeatureValueWithInt64 ¶
func MLFeatureValueFeatureValueWithInt64(value int64) *MLFeatureValue
Creates a feature value that contains an integer.
func MLFeatureValueFeatureValueWithMultiArray ¶
func MLFeatureValueFeatureValueWithMultiArray(value *MLMultiArray) *MLFeatureValue
Creates a feature value that contains a multidimensional array.
func MLFeatureValueFeatureValueWithPixelBuffer ¶
func MLFeatureValueFeatureValueWithPixelBuffer(value unsafe.Pointer) *MLFeatureValue
Creates a feature value that contains an image from a pixel buffer.
func MLFeatureValueFeatureValueWithSequence ¶
func MLFeatureValueFeatureValueWithSequence(sequence *MLSequence) *MLFeatureValue
Creates a feature value that contains a sequence.
func MLFeatureValueFeatureValueWithString ¶
func MLFeatureValueFeatureValueWithString(value *foundation.NSString) *MLFeatureValue
Creates a feature value that contains a string.
func MLFeatureValueFromID ¶
func MLFeatureValueFromID(id objc.ID) *MLFeatureValue
func MLFeatureValueUndefinedFeatureValueWithType ¶
func MLFeatureValueUndefinedFeatureValueWithType(type_ MLFeatureType) *MLFeatureValue
Creates a feature value with a type that represents an undefined or missing value.
func (*MLFeatureValue) DictionaryValue ¶
func (o *MLFeatureValue) DictionaryValue() *foundation.NSDictionary[objc.ID, *foundation.NSNumber]
Populated value if the type is MLFeatureTypeDictionary
func (*MLFeatureValue) DoubleValue ¶
func (o *MLFeatureValue) DoubleValue() float64
Populated value if the type is MLFeatureTypeDouble
func (*MLFeatureValue) ImageBufferValue ¶
func (o *MLFeatureValue) ImageBufferValue() unsafe.Pointer
Populated value if the type is MLFeatureTypeImage
func (*MLFeatureValue) Int64Value ¶
func (o *MLFeatureValue) Int64Value() int64
Populated value if the type is MLFeatureTypeInt64
func (*MLFeatureValue) IsEqualToFeatureValue ¶
func (o *MLFeatureValue) IsEqualToFeatureValue(value *MLFeatureValue) bool
Returns a Boolean value that indicates whether a feature value is equal to another.
func (*MLFeatureValue) IsUndefined ¶
func (o *MLFeatureValue) IsUndefined() bool
True if the value represents a missing or undefined value
func (*MLFeatureValue) MultiArrayValue ¶
func (o *MLFeatureValue) MultiArrayValue() *MLMultiArray
Populated value if the type is MLFeatureTypeMultiArray
func (*MLFeatureValue) SequenceValue ¶
func (o *MLFeatureValue) SequenceValue() *MLSequence
Populated value if the type is MLFeatureTypeSequence
func (*MLFeatureValue) StringValue ¶
func (o *MLFeatureValue) StringValue() *foundation.NSString
Populated value if the type is MLFeatureTypeString
func (*MLFeatureValue) Type ¶
func (o *MLFeatureValue) Type() MLFeatureType
Type of the value for which the corresponding property below is held
type MLGPUComputeDevice ¶
type MLGPUComputeDevice struct {
foundation.NSObject
}
An object that represents a GPU compute device.
Apple documentation: https://developer.apple.com/documentation/coreml/mlgpucomputedevice
func MLGPUComputeDeviceFromID ¶
func MLGPUComputeDeviceFromID(id objc.ID) *MLGPUComputeDevice
func (*MLGPUComputeDevice) MetalDevice ¶
func (o *MLGPUComputeDevice) MetalDevice() metal.MTLDevice
type MLImageConstraint ¶
type MLImageConstraint struct {
foundation.NSObject
}
The width, height, and pixel format constraints of an image feature.
Apple documentation: https://developer.apple.com/documentation/coreml/mlimageconstraint
func MLImageConstraintFromID ¶
func MLImageConstraintFromID(id objc.ID) *MLImageConstraint
func (*MLImageConstraint) PixelFormatType ¶
func (o *MLImageConstraint) PixelFormatType() uint
The accepted kCVPixelFormatType for the image.
func (*MLImageConstraint) PixelsHigh ¶
func (o *MLImageConstraint) PixelsHigh() int
The required or default height of the image
func (*MLImageConstraint) PixelsWide ¶
func (o *MLImageConstraint) PixelsWide() int
The required or default width of the image
func (*MLImageConstraint) SizeConstraint ¶
func (o *MLImageConstraint) SizeConstraint() *MLImageSizeConstraint
Detailed image size constraint
type MLImageSize ¶
type MLImageSize struct {
foundation.NSObject
}
The width and height of an image feature size.
Apple documentation: https://developer.apple.com/documentation/coreml/mlimagesize
func MLImageSizeFromID ¶
func MLImageSizeFromID(id objc.ID) *MLImageSize
func (*MLImageSize) PixelsHigh ¶
func (o *MLImageSize) PixelsHigh() int
func (*MLImageSize) PixelsWide ¶
func (o *MLImageSize) PixelsWide() int
type MLImageSizeConstraint ¶
type MLImageSizeConstraint struct {
foundation.NSObject
}
A list or range of sizes that augment an image constraint’s default size.
Apple documentation: https://developer.apple.com/documentation/coreml/mlimagesizeconstraint
func MLImageSizeConstraintFromID ¶
func MLImageSizeConstraintFromID(id objc.ID) *MLImageSizeConstraint
func (*MLImageSizeConstraint) EnumeratedImageSizes ¶
func (o *MLImageSizeConstraint) EnumeratedImageSizes() *foundation.NSArray[*MLImageSize]
func (*MLImageSizeConstraint) PixelsHighRange ¶
func (o *MLImageSizeConstraint) PixelsHighRange() foundation.NSRange
func (*MLImageSizeConstraint) PixelsWideRange ¶
func (o *MLImageSizeConstraint) PixelsWideRange() foundation.NSRange
func (*MLImageSizeConstraint) Type ¶
func (o *MLImageSizeConstraint) Type() MLImageSizeConstraintType
type MLImageSizeConstraintType ¶
type MLImageSizeConstraintType int64
The modes that determine how the model defines a feature’s image size constraint.
const ( // The image size constraint is not configured and should be ignored. MLImageSizeConstraintTypeUnspecified MLImageSizeConstraintType = 0 // The image feature accepts image sizes listed in an array. MLImageSizeConstraintTypeEnumerated MLImageSizeConstraintType = 2 // The image feature accepts image sizes defined by a range of widths and a range of heights. MLImageSizeConstraintTypeRange MLImageSizeConstraintType = 3 )
func (MLImageSizeConstraintType) String ¶
func (e MLImageSizeConstraintType) String() string
type MLKey ¶
type MLKey struct {
foundation.NSObject
}
An abstract base class for machine learning key types.
Apple documentation: https://developer.apple.com/documentation/coreml/mlkey
func MLKeyFromID ¶
func (*MLKey) Name ¶
func (o *MLKey) Name() *foundation.NSString
func (*MLKey) Scope ¶
func (o *MLKey) Scope() *foundation.NSString
type MLMetricKey ¶
type MLMetricKey struct {
MLKey
}
A key for the metrics dictionary in an update context.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmetrickey
func MLMetricKeyEpochIndex ¶
func MLMetricKeyEpochIndex() *MLMetricKey
func MLMetricKeyFromID ¶
func MLMetricKeyFromID(id objc.ID) *MLMetricKey
func MLMetricKeyLossValue ¶
func MLMetricKeyLossValue() *MLMetricKey
func MLMetricKeyMiniBatchIndex ¶
func MLMetricKeyMiniBatchIndex() *MLMetricKey
type MLModel ¶
type MLModel struct {
foundation.NSObject
}
An encapsulation of all the details of your machine learning model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodel
func MLModelFromID ¶
func MLModelModelWithContentsOfURLConfigurationError ¶
func MLModelModelWithContentsOfURLConfigurationError(url *foundation.NSURL, configuration *MLModelConfiguration) (*MLModel, error)
Creates a Core ML model instance from a compiled model file and a custom configuration.
func MLModelModelWithContentsOfURLError ¶
func MLModelModelWithContentsOfURLError(url *foundation.NSURL) (*MLModel, error)
Creates a Core ML model instance from a compiled model file.
func (*MLModel) Configuration ¶
func (o *MLModel) Configuration() *MLModelConfiguration
The load-time parameters used to instantiate this MLModel object.
func (*MLModel) ModelDescription ¶
func (o *MLModel) ModelDescription() *MLModelDescription
A model holds a description of its required inputs and expected outputs.
func (*MLModel) ParameterValueForKeyError ¶
func (o *MLModel) ParameterValueForKeyError(key *MLParameterKey) (objc.ID, error)
Returns a model parameter value for a key.
func (*MLModel) PredictionFromFeaturesCompletionHandler ¶
func (o *MLModel) PredictionFromFeaturesCompletionHandler(input MLFeatureProvider, completionHandler func(objc.ID, unsafe.Pointer))
Generates a prediction asynchronously from the feature values within the input feature provider.
func (*MLModel) PredictionFromFeaturesError ¶
func (o *MLModel) PredictionFromFeaturesError(input MLFeatureProvider) (MLFeatureProvider, error)
Generates a prediction from the feature values within the input feature provider.
func (*MLModel) PredictionFromFeaturesOptionsCompletionHandler ¶
func (o *MLModel) PredictionFromFeaturesOptionsCompletionHandler(input MLFeatureProvider, options *MLPredictionOptions, completionHandler func(objc.ID, unsafe.Pointer))
Generates a prediction asynchronously from the feature values within the input feature provider using the prediction options.
func (*MLModel) PredictionFromFeaturesOptionsError ¶
func (o *MLModel) PredictionFromFeaturesOptionsError(input MLFeatureProvider, options *MLPredictionOptions) (MLFeatureProvider, error)
Generates a prediction from the feature values within the input feature provider using the prediction options.
func (*MLModel) PredictionFromFeaturesUsingStateError ¶
func (o *MLModel) PredictionFromFeaturesUsingStateError(inputFeatures MLFeatureProvider, state *MLState) (MLFeatureProvider, error)
Run a stateful prediction synchronously. Use this method to run predictions on a stateful model. ```swift let state = model.newState() let prediction = try model.prediction(from: inputFeatures, using: state) ``` - Parameters: - inputFeatures: The input features as declared in the model description. - state: The state object created by `newState()` method. - error: The output parameter to receive an error information on failure.
func (*MLModel) PredictionFromFeaturesUsingStateOptionsCompletionHandler ¶
func (o *MLModel) PredictionFromFeaturesUsingStateOptionsCompletionHandler(inputFeatures MLFeatureProvider, state *MLState, options *MLPredictionOptions, completionHandler func(objc.ID, unsafe.Pointer))
Run a stateful prediction asynchronously.
func (*MLModel) PredictionFromFeaturesUsingStateOptionsError ¶
func (o *MLModel) PredictionFromFeaturesUsingStateOptionsError(inputFeatures MLFeatureProvider, state *MLState, options *MLPredictionOptions) (MLFeatureProvider, error)
Run a stateful prediction synchronously with options. Use this method to run predictions on a stateful model. ```swift let state = model.newState() let prediction = try model.prediction(from: inputFeatures, using: state, options: predictionOptions) ``` - Parameters: - inputFeatures: The input features as declared in the model description. - state: The state object created by `newState()` method. - options: The prediction options. - error: The output parameter to receive an error information on failure.
func (*MLModel) PredictionsFromBatchError ¶
func (o *MLModel) PredictionsFromBatchError(inputBatch MLBatchProvider) (MLBatchProvider, error)
Generates predictions for each input feature provider within the batch provider.
func (*MLModel) PredictionsFromBatchOptionsError ¶
func (o *MLModel) PredictionsFromBatchOptionsError(inputBatch MLBatchProvider, options *MLPredictionOptions) (MLBatchProvider, error)
Generates a prediction for each input feature provider within the batch provider using the prediction options.
type MLModelAsset ¶
type MLModelAsset struct {
foundation.NSObject
}
An abstraction of a compiled Core ML model asset.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelasset
func MLModelAssetFromID ¶
func MLModelAssetFromID(id objc.ID) *MLModelAsset
func MLModelAssetModelAssetWithSpecificationDataBlobMappingError ¶
func MLModelAssetModelAssetWithSpecificationDataBlobMappingError(specificationData *foundation.NSData, blobMapping *foundation.NSDictionary[*foundation.NSURL, *foundation.NSData]) (*MLModelAsset, error)
Construct a model asset from an ML Program specification by replacing blob file references with corresponding in-memory blobs.
func MLModelAssetModelAssetWithSpecificationDataError ¶
func MLModelAssetModelAssetWithSpecificationDataError(specificationData *foundation.NSData) (*MLModelAsset, error)
Creates a model asset from an in-memory model specification.
func MLModelAssetModelAssetWithURLError ¶
func MLModelAssetModelAssetWithURLError(compiledModelURL *foundation.NSURL) (*MLModelAsset, error)
Constructs a ModelAsset from a compiled model URL.
func (*MLModelAsset) FunctionNamesWithCompletionHandler ¶
func (o *MLModelAsset) FunctionNamesWithCompletionHandler(handler func(*foundation.NSArray[*foundation.NSString], unsafe.Pointer))
The list of function names in the model asset.
func (*MLModelAsset) ModelDescriptionOfFunctionNamedCompletionHandler ¶
func (o *MLModelAsset) ModelDescriptionOfFunctionNamedCompletionHandler(functionName *foundation.NSString, handler func(*MLModelDescription, unsafe.Pointer))
The model descripton for a specified function.
func (*MLModelAsset) ModelDescriptionWithCompletionHandler ¶
func (o *MLModelAsset) ModelDescriptionWithCompletionHandler(handler func(*MLModelDescription, unsafe.Pointer))
The default model descripton.
type MLModelConfiguration ¶
type MLModelConfiguration struct {
foundation.NSObject
}
The settings for creating or updating a machine learning model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelconfiguration
func MLModelConfigurationFromID ¶
func MLModelConfigurationFromID(id objc.ID) *MLModelConfiguration
func (*MLModelConfiguration) AllowLowPrecisionAccumulationOnGPU ¶
func (o *MLModelConfiguration) AllowLowPrecisionAccumulationOnGPU() bool
Set to YES to allow low precision accumulation on GPU when available. Defaults to NO
func (*MLModelConfiguration) ComputeUnits ¶
func (o *MLModelConfiguration) ComputeUnits() MLComputeUnits
func (*MLModelConfiguration) FunctionName ¶
func (o *MLModelConfiguration) FunctionName() *foundation.NSString
func (*MLModelConfiguration) ModelDisplayName ¶
func (o *MLModelConfiguration) ModelDisplayName() *foundation.NSString
A human readable name of a MLModel instance for display purposes. Use this property to set a name of a model instance so that runtime analysis tools (e.g. Instruments and os_log) can display that name in the user interface. CoreML framework doesn't parse nor filter the text. It is the client's responsibility to use appropriate text, which may involve localization and privacy considerations. When the property is nil, CoreML framework provides a default.
func (*MLModelConfiguration) OptimizationHints ¶
func (o *MLModelConfiguration) OptimizationHints() *MLOptimizationHints
A group of hints for CoreML to optimize
func (*MLModelConfiguration) Parameters ¶
func (o *MLModelConfiguration) Parameters() *foundation.NSDictionary[*MLParameterKey, objc.ID]
func (*MLModelConfiguration) PreferredMetalDevice ¶
func (o *MLModelConfiguration) PreferredMetalDevice() metal.MTLDevice
Set to specify a preferred Metal device. Defaults to nil which indicates automatic selection
func (*MLModelConfiguration) SetAllowLowPrecisionAccumulationOnGPU ¶
func (o *MLModelConfiguration) SetAllowLowPrecisionAccumulationOnGPU(allowLowPrecisionAccumulationOnGPU bool)
func (*MLModelConfiguration) SetComputeUnits ¶
func (o *MLModelConfiguration) SetComputeUnits(computeUnits MLComputeUnits)
func (*MLModelConfiguration) SetFunctionName ¶
func (o *MLModelConfiguration) SetFunctionName(functionName *foundation.NSString)
func (*MLModelConfiguration) SetModelDisplayName ¶
func (o *MLModelConfiguration) SetModelDisplayName(modelDisplayName *foundation.NSString)
func (*MLModelConfiguration) SetOptimizationHints ¶
func (o *MLModelConfiguration) SetOptimizationHints(optimizationHints *MLOptimizationHints)
func (*MLModelConfiguration) SetParameters ¶
func (o *MLModelConfiguration) SetParameters(parameters *foundation.NSDictionary[*MLParameterKey, objc.ID])
func (*MLModelConfiguration) SetPreferredMetalDevice ¶
func (o *MLModelConfiguration) SetPreferredMetalDevice(preferredMetalDevice metal.MTLDevice)
type MLModelDescription ¶
type MLModelDescription struct {
foundation.NSObject
}
Information about a model, primarily the input and output format for each feature the model expects, and optional metadata.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodeldescription
func MLModelDescriptionFromID ¶
func MLModelDescriptionFromID(id objc.ID) *MLModelDescription
func (*MLModelDescription) ClassLabels ¶
func (o *MLModelDescription) ClassLabels() *foundation.NSArray[objc.ID]
Array to map a class index to the corresponding label, which is either Number or String. The property is populated from the classLabels entry specified in the model's protobuf message. When the model is a pipeline, which contains one or more sub models, the property value is calculated as follows. 1. If the pipeline model's proto message specifies predictedFeatureName parameter, use classLabels property value of the sub model with the output feature with the name. 2. Otherwise, if the pipeline model has only one sub model with non-nil classLabels property, use the property value. 3. Otherwise, the property is nil.
func (*MLModelDescription) InputDescriptionsByName ¶
func (o *MLModelDescription) InputDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
Description of the inputs to the model
func (*MLModelDescription) IsUpdatable ¶
func (o *MLModelDescription) IsUpdatable() bool
func (*MLModelDescription) Metadata ¶
func (o *MLModelDescription) Metadata() *foundation.NSDictionary[*foundation.NSString, objc.ID]
Optional metadata describing the model
func (*MLModelDescription) OutputDescriptionsByName ¶
func (o *MLModelDescription) OutputDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
Description of the outputs from the model
func (*MLModelDescription) ParameterDescriptionsByKey ¶
func (o *MLModelDescription) ParameterDescriptionsByKey() *foundation.NSDictionary[*MLParameterKey, *MLParameterDescription]
func (*MLModelDescription) PredictedFeatureName ¶
func (o *MLModelDescription) PredictedFeatureName() *foundation.NSString
Name of the primary target / predicted output feature in the output descriptions
func (*MLModelDescription) PredictedProbabilitiesName ¶
func (o *MLModelDescription) PredictedProbabilitiesName() *foundation.NSString
Key for all predicted probabilities stored as a MLFeatureTypeDictionary in the output descriptions
func (*MLModelDescription) StateDescriptionsByName ¶
func (o *MLModelDescription) StateDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
Description of the state features.
func (*MLModelDescription) TrainingInputDescriptionsByName ¶
func (o *MLModelDescription) TrainingInputDescriptionsByName() *foundation.NSDictionary[*foundation.NSString, *MLFeatureDescription]
type MLModelError ¶
type MLModelError int64
Information about a Core ML model error.
const ( // Core ML throws/returns this error when the framework encounters an generic error. The typical cause for this error is an unexpected framework level problem. MLModelErrorGeneric MLModelError = 0 // Core ML throws/returns this error when the model client, typically an application, sends the wrong feature type to a model's input. The typical cause for this error is a programming mistake. For example, a prediction method will throw/return the error when the caller passes an image to a model's input that expects an `MLMultiArray`. MLModelErrorFeatureType MLModelError = 1 // Core ML throws/returns this error when the framework encounters some I/O problem, most likely a file I/O problem. For example, a model loading will throw/return the error when the caller requests a non-existing model URL. MLModelErrorIO MLModelError = 3 // Core ML throws/returns this error when the framework encounters an error in the custom layer subsystem. The typical cause for this error is a programming mistake. For example, a prediction method will throw/return the error when it fails to find the custom layer implementation. MLModelErrorCustomLayer MLModelError = 4 // Core ML throws/returns this error when the framework encounters an error in the custom model subsystem. The typical cause for this error is a programming mistake. For example, a prediction method will throw/return the error when it fails to find the custom model implementation. MLModelErrorCustomModel MLModelError = 5 // Core ML throws/returns this error when the framework encounters an error while performing the on-device model update. For example, the framework will throw/return the error when it fails to save the updated model. MLModelErrorUpdate MLModelError = 6 // Core ML throws/returns this error when the model client, typically an application, queries an unsupported model parameter (see MLParameterKey). The typical cause for this error is a programming mistake. MLModelErrorParameters MLModelError = 7 // Core ML throws/returns this error when the framework fails to download the model decryption key. The typical cause for this error is a network connection issue to the key server. MLModelErrorModelDecryptionKeyFetch MLModelError = 8 // Core ML throws/returns this error when the framework encounters an error in the model decryption subsystem. The typical cause for this error is in the key server configuration and the client application cannot do much about it. For example, a model loading method will throw/return the error when it uses incorrect model decryption key. MLModelErrorModelDecryption MLModelError = 9 // Core ML throws/returns this error when the framework encounters an error in the model collection deployment subsystem. The typical cause for this error is the network connectability issue to the model deployment server. MLModelErrorModelCollection MLModelError = 10 // Core ML throws/returns this error when the prediction is cancelled prior to completing. MLModelErrorPredictionCancelled MLModelError = 11 )
func (MLModelError) String ¶
func (e MLModelError) String() string
type MLModelStructure ¶
type MLModelStructure struct {
foundation.NSObject
}
An enum representing the structure of a model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructure
func MLModelStructureFromID ¶
func MLModelStructureFromID(id objc.ID) *MLModelStructure
func (*MLModelStructure) NeuralNetwork ¶
func (o *MLModelStructure) NeuralNetwork() *MLModelStructureNeuralNetwork
If the model is of NeuralNetwork type then it is the structure of the NeuralNetwork otherwise `nil`.
func (*MLModelStructure) Pipeline ¶
func (o *MLModelStructure) Pipeline() *MLModelStructurePipeline
If the model is of Pipeline type then it is the structure of the Pipeline otherwise `nil`.
func (*MLModelStructure) Program ¶
func (o *MLModelStructure) Program() *MLModelStructureProgram
If the model is of ML Program type then it is the structure of the ML Program otherwise `nil`.
type MLModelStructureNeuralNetwork ¶
type MLModelStructureNeuralNetwork struct {
foundation.NSObject
}
A class representing the structure of a NeuralNetwork model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureneuralnetwork
func MLModelStructureNeuralNetworkFromID ¶
func MLModelStructureNeuralNetworkFromID(id objc.ID) *MLModelStructureNeuralNetwork
func (*MLModelStructureNeuralNetwork) Layers ¶
func (o *MLModelStructureNeuralNetwork) Layers() *foundation.NSArray[*MLModelStructureNeuralNetworkLayer]
type MLModelStructureNeuralNetworkLayer ¶
type MLModelStructureNeuralNetworkLayer struct {
foundation.NSObject
}
A class representing a layer in a NeuralNetwork.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureneuralnetworklayer
func MLModelStructureNeuralNetworkLayerFromID ¶
func MLModelStructureNeuralNetworkLayerFromID(id objc.ID) *MLModelStructureNeuralNetworkLayer
func (*MLModelStructureNeuralNetworkLayer) InputNames ¶
func (o *MLModelStructureNeuralNetworkLayer) InputNames() *foundation.NSArray[*foundation.NSString]
The input names.
func (*MLModelStructureNeuralNetworkLayer) Name ¶
func (o *MLModelStructureNeuralNetworkLayer) Name() *foundation.NSString
The layer name.
func (*MLModelStructureNeuralNetworkLayer) OutputNames ¶
func (o *MLModelStructureNeuralNetworkLayer) OutputNames() *foundation.NSArray[*foundation.NSString]
The output names.
func (*MLModelStructureNeuralNetworkLayer) Type ¶
func (o *MLModelStructureNeuralNetworkLayer) Type() *foundation.NSString
The type of the layer, e,g, "elementwise", "pooling", etc.
type MLModelStructurePipeline ¶
type MLModelStructurePipeline struct {
foundation.NSObject
}
A class representing the structure of a Pipeline model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructurepipeline
func MLModelStructurePipelineFromID ¶
func MLModelStructurePipelineFromID(id objc.ID) *MLModelStructurePipeline
func (*MLModelStructurePipeline) SubModelNames ¶
func (o *MLModelStructurePipeline) SubModelNames() *foundation.NSArray[*foundation.NSString]
The names of the sub models in the pipeline.
func (*MLModelStructurePipeline) SubModels ¶
func (o *MLModelStructurePipeline) SubModels() *foundation.NSArray[*MLModelStructure]
The structure of the sub models in the pipeline.
type MLModelStructureProgram ¶
type MLModelStructureProgram struct {
foundation.NSObject
}
A class representing the structure of an ML Program model.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogram
func MLModelStructureProgramFromID ¶
func MLModelStructureProgramFromID(id objc.ID) *MLModelStructureProgram
func (*MLModelStructureProgram) Functions ¶
func (o *MLModelStructureProgram) Functions() *foundation.NSDictionary[*foundation.NSString, *MLModelStructureProgramFunction]
type MLModelStructureProgramArgument ¶
type MLModelStructureProgramArgument struct {
foundation.NSObject
}
A class representing an argument in the Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramargument
func MLModelStructureProgramArgumentFromID ¶
func MLModelStructureProgramArgumentFromID(id objc.ID) *MLModelStructureProgramArgument
func (*MLModelStructureProgramArgument) Bindings ¶
func (o *MLModelStructureProgramArgument) Bindings() *foundation.NSArray[*MLModelStructureProgramBinding]
type MLModelStructureProgramBinding ¶
type MLModelStructureProgramBinding struct {
foundation.NSObject
}
A class representing a binding in the Program
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogrambinding
func MLModelStructureProgramBindingFromID ¶
func MLModelStructureProgramBindingFromID(id objc.ID) *MLModelStructureProgramBinding
func (*MLModelStructureProgramBinding) Name ¶
func (o *MLModelStructureProgramBinding) Name() *foundation.NSString
The name of the variable in the Program.
func (*MLModelStructureProgramBinding) Value ¶
func (o *MLModelStructureProgramBinding) Value() *MLModelStructureProgramValue
The compile time constant value in the Program.
type MLModelStructureProgramBlock ¶
type MLModelStructureProgramBlock struct {
foundation.NSObject
}
A class representing a block in the Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramblock
func MLModelStructureProgramBlockFromID ¶
func MLModelStructureProgramBlockFromID(id objc.ID) *MLModelStructureProgramBlock
func (*MLModelStructureProgramBlock) Inputs ¶
func (o *MLModelStructureProgramBlock) Inputs() *foundation.NSArray[*MLModelStructureProgramNamedValueType]
The named inputs to the block.
func (*MLModelStructureProgramBlock) Operations ¶
func (o *MLModelStructureProgramBlock) Operations() *foundation.NSArray[*MLModelStructureProgramOperation]
The list of topologically sorted operations in the block.
func (*MLModelStructureProgramBlock) OutputNames ¶
func (o *MLModelStructureProgramBlock) OutputNames() *foundation.NSArray[*foundation.NSString]
The output names.
type MLModelStructureProgramFunction ¶
type MLModelStructureProgramFunction struct {
foundation.NSObject
}
A class representing a function in the Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramfunction
func MLModelStructureProgramFunctionFromID ¶
func MLModelStructureProgramFunctionFromID(id objc.ID) *MLModelStructureProgramFunction
func (*MLModelStructureProgramFunction) Block ¶
func (o *MLModelStructureProgramFunction) Block() *MLModelStructureProgramBlock
The active block in the function.
func (*MLModelStructureProgramFunction) Inputs ¶
func (o *MLModelStructureProgramFunction) Inputs() *foundation.NSArray[*MLModelStructureProgramNamedValueType]
The named inputs to the function.
type MLModelStructureProgramNamedValueType ¶
type MLModelStructureProgramNamedValueType struct {
foundation.NSObject
}
A class representing a named value type in a Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramnamedvaluetype
func MLModelStructureProgramNamedValueTypeFromID ¶
func MLModelStructureProgramNamedValueTypeFromID(id objc.ID) *MLModelStructureProgramNamedValueType
func (*MLModelStructureProgramNamedValueType) Name ¶
func (o *MLModelStructureProgramNamedValueType) Name() *foundation.NSString
The name of the parameter.
func (*MLModelStructureProgramNamedValueType) Type ¶
func (o *MLModelStructureProgramNamedValueType) Type() *MLModelStructureProgramValueType
The type of the parameter.
type MLModelStructureProgramOperation ¶
type MLModelStructureProgramOperation struct {
foundation.NSObject
}
A class representing an Operation in a Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramoperation
func MLModelStructureProgramOperationFromID ¶
func MLModelStructureProgramOperationFromID(id objc.ID) *MLModelStructureProgramOperation
func (*MLModelStructureProgramOperation) Blocks ¶
func (o *MLModelStructureProgramOperation) Blocks() *foundation.NSArray[*MLModelStructureProgramBlock]
Nested blocks for loops and conditionals, e.g., a conditional block will have two entries here.
func (*MLModelStructureProgramOperation) Inputs ¶
func (o *MLModelStructureProgramOperation) Inputs() *foundation.NSDictionary[*foundation.NSString, *MLModelStructureProgramArgument]
The arguments to the Operation.
func (*MLModelStructureProgramOperation) OperatorName ¶
func (o *MLModelStructureProgramOperation) OperatorName() *foundation.NSString
The name of the operator, e.g., "conv", "pool", "softmax", etc.
func (*MLModelStructureProgramOperation) Outputs ¶
func (o *MLModelStructureProgramOperation) Outputs() *foundation.NSArray[*MLModelStructureProgramNamedValueType]
The outputs of the Operation.
type MLModelStructureProgramValue ¶
type MLModelStructureProgramValue struct {
foundation.NSObject
}
A class representing a constant value in the Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramvalue
func MLModelStructureProgramValueFromID ¶
func MLModelStructureProgramValueFromID(id objc.ID) *MLModelStructureProgramValue
type MLModelStructureProgramValueType ¶
type MLModelStructureProgramValueType struct {
foundation.NSObject
}
A class representing the type of a value or a variable in the Program.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmodelstructureprogramvaluetype
func MLModelStructureProgramValueTypeFromID ¶
func MLModelStructureProgramValueTypeFromID(id objc.ID) *MLModelStructureProgramValueType
type MLMultiArray ¶
type MLMultiArray struct {
foundation.NSObject
}
A machine learning collection type that stores numeric values in an array with multiple dimensions.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmultiarray
func MLMultiArrayFromID ¶
func MLMultiArrayFromID(id objc.ID) *MLMultiArray
func MLMultiArrayMultiArrayByConcatenatingMultiArraysAlongAxisDataType ¶
func MLMultiArrayMultiArrayByConcatenatingMultiArraysAlongAxisDataType(multiArrays *foundation.NSArray[*MLMultiArray], axis int, dataType MLMultiArrayDataType) *MLMultiArray
Concatenate MLMultiArrays to form a new MLMultiArray.
func (*MLMultiArray) Count ¶
func (o *MLMultiArray) Count() int
Count of total number of addressable scalars. The value is same as `product_d shape[d]`.
func (*MLMultiArray) DataPointer ¶
func (o *MLMultiArray) DataPointer() unsafe.Pointer
Unsafe pointer to underlying buffer holding the data Deprecated: Use getBytesWithHandler or getMutableBytesWithHandler instead. For Swift, use withUnsafeBytes or withUnsafeMutableBytes.
func (*MLMultiArray) DataType ¶
func (o *MLMultiArray) DataType() MLMultiArrayDataType
Scalar's data type. Deprecated: Use getBytesWithHandler or getMutableBytesWithHandler instead. For Swift, use withUnsafeBytes or withUnsafeMutableBytes.
func (*MLMultiArray) GetBytesWithHandler ¶
func (o *MLMultiArray) GetBytesWithHandler(handler func(unsafe.Pointer, int))
Get the underlying buffer pointer to read.
func (*MLMultiArray) GetMutableBytesWithHandler ¶
func (o *MLMultiArray) GetMutableBytesWithHandler(handler func(unsafe.Pointer, int, *foundation.NSArray[*foundation.NSNumber]))
Get the underlying buffer pointer to mutate.
func (*MLMultiArray) InitWithDataPointerShapeDataTypeStridesDeallocatorError ¶
func (o *MLMultiArray) InitWithDataPointerShapeDataTypeStridesDeallocatorError(dataPointer unsafe.Pointer, shape *foundation.NSArray[*foundation.NSNumber], dataType MLMultiArrayDataType, strides *foundation.NSArray[*foundation.NSNumber], deallocator func(unsafe.Pointer)) (*MLMultiArray, error)
Creates a multiarray from a data pointer.
func (*MLMultiArray) InitWithPixelBufferShape ¶
func (o *MLMultiArray) InitWithPixelBufferShape(pixelBuffer unsafe.Pointer, shape *foundation.NSArray[*foundation.NSNumber]) *MLMultiArray
Creates a multiarray sharing the surface of a pixel buffer.
func (*MLMultiArray) InitWithShapeDataTypeError ¶
func (o *MLMultiArray) InitWithShapeDataTypeError(shape *foundation.NSArray[*foundation.NSNumber], dataType MLMultiArrayDataType) (*MLMultiArray, error)
Creates a multidimensional array with a shape and type.
func (*MLMultiArray) InitWithShapeDataTypeStrides ¶
func (o *MLMultiArray) InitWithShapeDataTypeStrides(shape *foundation.NSArray[*foundation.NSNumber], dataType MLMultiArrayDataType, strides *foundation.NSArray[*foundation.NSNumber]) *MLMultiArray
Creates the object with specified strides.
func (*MLMultiArray) ObjectAtIndexedSubscript ¶
func (o *MLMultiArray) ObjectAtIndexedSubscript(idx int) *foundation.NSNumber
Get a value by its linear index (assumes C-style index ordering)
func (*MLMultiArray) ObjectForKeyedSubscript ¶
func (o *MLMultiArray) ObjectForKeyedSubscript(key *foundation.NSArray[*foundation.NSNumber]) *foundation.NSNumber
Get a value by its multidimensional index (NSArray<NSNumber *>)
func (*MLMultiArray) PixelBuffer ¶
func (o *MLMultiArray) PixelBuffer() unsafe.Pointer
Returns the backing pixel buffer if exists, otherwise nil.
func (*MLMultiArray) SetObjectAtIndexedSubscript ¶
func (o *MLMultiArray) SetObjectAtIndexedSubscript(obj *foundation.NSNumber, idx int)
Assigns a number to the multiarray’s element at the location that the linear offset defines.
func (*MLMultiArray) SetObjectForKeyedSubscript ¶
func (o *MLMultiArray) SetObjectForKeyedSubscript(obj *foundation.NSNumber, key *foundation.NSArray[*foundation.NSNumber])
Assigns a number to the multiarray’s element at the location that the number array defines.
func (*MLMultiArray) Shape ¶
func (o *MLMultiArray) Shape() *foundation.NSArray[*foundation.NSNumber]
Shape of the multi-dimensional space that this instance represents.
func (*MLMultiArray) Strides ¶
func (o *MLMultiArray) Strides() *foundation.NSArray[*foundation.NSNumber]
Strides. It defines the offset of the scalar of a given coordinate index in the storage, which is: ``` scalarOffset = sum_d index[d]*strides[d] ```
func (*MLMultiArray) TransferToMultiArray ¶
func (o *MLMultiArray) TransferToMultiArray(destinationMultiArray *MLMultiArray)
Transfer the contents to the destination multi-array.
type MLMultiArrayConstraint ¶
type MLMultiArrayConstraint struct {
foundation.NSObject
}
The shape and data type constraints for a multidimensional array feature.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmultiarrayconstraint
func MLMultiArrayConstraintFromID ¶
func MLMultiArrayConstraintFromID(id objc.ID) *MLMultiArrayConstraint
func (*MLMultiArrayConstraint) DataType ¶
func (o *MLMultiArrayConstraint) DataType() MLMultiArrayDataType
func (*MLMultiArrayConstraint) Shape ¶
func (o *MLMultiArrayConstraint) Shape() *foundation.NSArray[*foundation.NSNumber]
func (*MLMultiArrayConstraint) ShapeConstraint ¶
func (o *MLMultiArrayConstraint) ShapeConstraint() *MLMultiArrayShapeConstraint
type MLMultiArrayDataType ¶
type MLMultiArrayDataType int64
Constants that define the underlying element types a multiarray can store.
const ( // Designates the multiarray’s elements as doubles. MLMultiArrayDataTypeDouble MLMultiArrayDataType = 65600 // Designates the multiarray’s elements as 64-bit floats. MLMultiArrayDataTypeFloat64 MLMultiArrayDataType = 65600 // Designates the multiarray’s elements as 32-bit floats. MLMultiArrayDataTypeFloat32 MLMultiArrayDataType = 65568 // Designates the multiarray’s elements as 16-bit floats. MLMultiArrayDataTypeFloat16 MLMultiArrayDataType = 65552 // Designates the multiarray’s elements as floats. MLMultiArrayDataTypeFloat MLMultiArrayDataType = 65568 // Designates the multiarray’s elements as 32-bit integers. MLMultiArrayDataTypeInt32 MLMultiArrayDataType = 131104 MLMultiArrayDataTypeInt8 MLMultiArrayDataType = 131080 )
func (MLMultiArrayDataType) String ¶
func (e MLMultiArrayDataType) String() string
type MLMultiArrayShapeConstraint ¶
type MLMultiArrayShapeConstraint struct {
foundation.NSObject
}
The lists of shapes or ranges of shapes that constrain a multiarray feature.
Apple documentation: https://developer.apple.com/documentation/coreml/mlmultiarrayshapeconstraint
func MLMultiArrayShapeConstraintFromID ¶
func MLMultiArrayShapeConstraintFromID(id objc.ID) *MLMultiArrayShapeConstraint
func (*MLMultiArrayShapeConstraint) EnumeratedShapes ¶
func (o *MLMultiArrayShapeConstraint) EnumeratedShapes() *foundation.NSArray[objc.ID]
func (*MLMultiArrayShapeConstraint) SizeRangeForDimension ¶
func (o *MLMultiArrayShapeConstraint) SizeRangeForDimension() *foundation.NSArray[*foundation.NSValue]
func (*MLMultiArrayShapeConstraint) Type ¶
func (o *MLMultiArrayShapeConstraint) Type() MLMultiArrayShapeConstraintType
type MLMultiArrayShapeConstraintType ¶
type MLMultiArrayShapeConstraintType int64
The possible types of shape constraints.
const ( // The constraint type is undefined. MLMultiArrayShapeConstraintTypeUnspecified MLMultiArrayShapeConstraintType = 1 // The constraint is an array of allowed shapes. MLMultiArrayShapeConstraintTypeEnumerated MLMultiArrayShapeConstraintType = 2 // The constraint is a set of ranges allowed for the array shape. MLMultiArrayShapeConstraintTypeRange MLMultiArrayShapeConstraintType = 3 )
func (MLMultiArrayShapeConstraintType) String ¶
func (e MLMultiArrayShapeConstraintType) String() string
type MLNeuralEngineComputeDevice ¶
type MLNeuralEngineComputeDevice struct {
foundation.NSObject
}
An object that represents a Neural Engine compute device.
Apple documentation: https://developer.apple.com/documentation/coreml/mlneuralenginecomputedevice
func MLNeuralEngineComputeDeviceFromID ¶
func MLNeuralEngineComputeDeviceFromID(id objc.ID) *MLNeuralEngineComputeDevice
func (*MLNeuralEngineComputeDevice) TotalCoreCount ¶
func (o *MLNeuralEngineComputeDevice) TotalCoreCount() int
type MLNumericConstraint ¶
type MLNumericConstraint struct {
foundation.NSObject
}
The value limitations of a number.
Apple documentation: https://developer.apple.com/documentation/coreml/mlnumericconstraint
func MLNumericConstraintFromID ¶
func MLNumericConstraintFromID(id objc.ID) *MLNumericConstraint
func (*MLNumericConstraint) EnumeratedNumbers ¶
func (o *MLNumericConstraint) EnumeratedNumbers() *foundation.NSSet[*foundation.NSNumber]
func (*MLNumericConstraint) MaxNumber ¶
func (o *MLNumericConstraint) MaxNumber() *foundation.NSNumber
func (*MLNumericConstraint) MinNumber ¶
func (o *MLNumericConstraint) MinNumber() *foundation.NSNumber
type MLOptimizationHints ¶
type MLOptimizationHints struct {
foundation.NSObject
}
Apple documentation: https://developer.apple.com/documentation/coreml/mloptimizationhints
func MLOptimizationHintsFromID ¶
func MLOptimizationHintsFromID(id objc.ID) *MLOptimizationHints
func (*MLOptimizationHints) ReshapeFrequency ¶
func (o *MLOptimizationHints) ReshapeFrequency() MLReshapeFrequencyHint
The anticipated reshape frequency CoreML framework needs to reshape the model with new shapes for models with flexible input. Specify the anticipated reshape frequency (frequent or infrequent), so that the framework can optimize for fast shape switching or fast prediction on seen shapes. The default value is frequent, which means CoreML tries to switch to new shapes as fast as possible
func (*MLOptimizationHints) SetReshapeFrequency ¶
func (o *MLOptimizationHints) SetReshapeFrequency(reshapeFrequency MLReshapeFrequencyHint)
func (*MLOptimizationHints) SetSpecializationStrategy ¶
func (o *MLOptimizationHints) SetSpecializationStrategy(specializationStrategy MLSpecializationStrategy)
func (*MLOptimizationHints) SpecializationStrategy ¶
func (o *MLOptimizationHints) SpecializationStrategy() MLSpecializationStrategy
Optimization strategy for the model specialization. Core ML segments the model's compute graph and optimizes each segment for the target compute device. This process can affect the model loading time and the prediction latency. Use this option to tailor the specialization strategy for your application.
type MLParameterDescription ¶
type MLParameterDescription struct {
foundation.NSObject
}
A description of a model parameter that includes a default value and a constraint, if applicable.
Apple documentation: https://developer.apple.com/documentation/coreml/mlparameterdescription
func MLParameterDescriptionFromID ¶
func MLParameterDescriptionFromID(id objc.ID) *MLParameterDescription
func (*MLParameterDescription) DefaultValue ¶
func (o *MLParameterDescription) DefaultValue() objc.ID
func (*MLParameterDescription) Key ¶
func (o *MLParameterDescription) Key() *MLParameterKey
func (*MLParameterDescription) NumericConstraint ¶
func (o *MLParameterDescription) NumericConstraint() *MLNumericConstraint
type MLParameterKey ¶
type MLParameterKey struct {
MLKey
}
The keys for the parameter dictionary in a model configuration or a model update context.
Apple documentation: https://developer.apple.com/documentation/coreml/mlparameterkey
func MLParameterKeyBeta1 ¶
func MLParameterKeyBeta1() *MLParameterKey
func MLParameterKeyBeta2 ¶
func MLParameterKeyBeta2() *MLParameterKey
func MLParameterKeyBiases ¶
func MLParameterKeyBiases() *MLParameterKey
func MLParameterKeyEpochs ¶
func MLParameterKeyEpochs() *MLParameterKey
func MLParameterKeyEps ¶
func MLParameterKeyEps() *MLParameterKey
func MLParameterKeyFromID ¶
func MLParameterKeyFromID(id objc.ID) *MLParameterKey
func MLParameterKeyLearningRate ¶
func MLParameterKeyLearningRate() *MLParameterKey
func MLParameterKeyLinkedModelFileName ¶
func MLParameterKeyLinkedModelFileName() *MLParameterKey
func MLParameterKeyLinkedModelSearchPath ¶
func MLParameterKeyLinkedModelSearchPath() *MLParameterKey
func MLParameterKeyMiniBatchSize ¶
func MLParameterKeyMiniBatchSize() *MLParameterKey
func MLParameterKeyMomentum ¶
func MLParameterKeyMomentum() *MLParameterKey
func MLParameterKeyNumberOfNeighbors ¶
func MLParameterKeyNumberOfNeighbors() *MLParameterKey
func MLParameterKeySeed ¶
func MLParameterKeySeed() *MLParameterKey
func MLParameterKeyShuffle ¶
func MLParameterKeyShuffle() *MLParameterKey
func MLParameterKeyWeights ¶
func MLParameterKeyWeights() *MLParameterKey
func (*MLParameterKey) ScopedTo ¶
func (o *MLParameterKey) ScopedTo(scope *foundation.NSString) *MLParameterKey
Creates a copy of a parameter key and adds the scope to it.
type MLPredictionOptions ¶
type MLPredictionOptions struct {
foundation.NSObject
}
The options available when making a prediction.
Apple documentation: https://developer.apple.com/documentation/coreml/mlpredictionoptions
func MLPredictionOptionsFromID ¶
func MLPredictionOptionsFromID(id objc.ID) *MLPredictionOptions
func (*MLPredictionOptions) OutputBackings ¶
func (o *MLPredictionOptions) OutputBackings() *foundation.NSDictionary[*foundation.NSString, objc.ID]
@abstract Propose the model to use the specified backing objects for the output feature values. @discussion Use the property to get the inference result directly into the client allocated buffer when possible for efficient memory management. The property is a dictionary of the feature name and the output backing object. The framework may not use the specified backing object and instead allocates one by itself if the outputBacking dictionary doesn't contain the entry for the feature name, the model doesn't support the user allocated buffers, or in the batch prediction mode. To check if the backing object was used, compare the output prediction and the backing object by object identity. \code CVPixelBufferRef outputBacking = ...; [options setOutputBackings:@{@"outputImage" : (__bridge id)outputBacking}]; id<MLFeatureProvider> prediction = [model predictionFromFeatures:inputFeatures options:options error:&error]; if ([prediction featureValueForName:@"outputImage"].imageBufferValue == outputBacking) { // backing was used. } else { // backing was NOT used. } \endcode The backing object must be either CVPixelBuffer or MLMultiArray depending on the feature value type. Do not lock the base address of the CVPixelBuffer. In the case of a MLMultiArray backed by a pixel buffer, make sure not to lock the underlying pixel buffer by not calling any data methods such as `.dataPointer` and subscript methods before the prediction. The framework ignores a backing object with an unknown feature name. For the best performance, use page-aligned address in MLMultiArray. \code #import <mach/vm_page_size.h> : void *backingBuffer = aligned_alloc(vm_page_size, round_page(backingBufferSize)); if (backingBuffer == NULL) { ... error handling ... } MLMultiArray *outputBacking = [[MLMultiArray alloc] initWithDataPointer:(char *)backingBuffer ... deallocator:^(void *) { free(backingBuffer); } ... ]; \endcode For CVPixelBuffer backing, consider to use IOSurface-backed CVPixelBuffer created by CVPixelBufferPool because it is often the most efficient choice for memory footprint and performance, especially when the pixel buffers are subsequently used for playback or export. (See also AVSampleBufferDisplayLayer and AVAssetWriter.) The output backing object must satisfy the output feature description's `-isAllowedValue:` test, or the framework reporets an error at the prediction time. The exception is FP16 MLMultiArray backed by CVPixelBuffer, which may be accepted in Double or Float32 multi array output feature depending on the underlying inference engine.
func (*MLPredictionOptions) SetOutputBackings ¶
func (o *MLPredictionOptions) SetOutputBackings(outputBackings *foundation.NSDictionary[*foundation.NSString, objc.ID])
func (*MLPredictionOptions) SetUsesCPUOnly
deprecated
func (o *MLPredictionOptions) SetUsesCPUOnly(usesCPUOnly bool)
Deprecated: since macOS 12.0.
func (*MLPredictionOptions) UsesCPUOnly ¶
func (o *MLPredictionOptions) UsesCPUOnly() bool
Set to YES to force computation to be on the CPU only Deprecated: since macOS 12.0.
type MLReshapeFrequencyHint ¶
type MLReshapeFrequencyHint int64
const ( // The input shape is expected to change frequently on each prediction sent to this loaded model instance. Core ML will try to minimize the latency associated with shape changes and avoid expensive shape-specific optimizations prior to prediction computation. While prediction computation may be slower for each specific shape, switching between shapes should be faster. This is the default. MLReshapeFrequencyHintFrequent MLReshapeFrequencyHint = 0 // The input shape is expected to be stable and many/all predictions sent to this loaded model instance would use the same input shapes repeatedly. On the shape change, Core ML re-optimizes the internal engine for the new shape if possible. The re-optimization takes some time, but the subsequent predictions for the shape should run faster. MLReshapeFrequencyHintInfrequent MLReshapeFrequencyHint = 1 )
func (MLReshapeFrequencyHint) String ¶
func (e MLReshapeFrequencyHint) String() string
type MLSequence ¶
type MLSequence struct {
foundation.NSObject
}
A machine learning collection type that stores a series of strings or integers.
Apple documentation: https://developer.apple.com/documentation/coreml/mlsequence
func MLSequenceEmptySequenceWithType ¶
func MLSequenceEmptySequenceWithType(type_ MLFeatureType) *MLSequence
Creates an empty sequence of strings or integers.
func MLSequenceFromID ¶
func MLSequenceFromID(id objc.ID) *MLSequence
func MLSequenceSequenceWithInt64Array ¶
func MLSequenceSequenceWithInt64Array(int64Values *foundation.NSArray[*foundation.NSNumber]) *MLSequence
Creates a sequence of integers from an array of numbers.
func MLSequenceSequenceWithStringArray ¶
func MLSequenceSequenceWithStringArray(stringValues *foundation.NSArray[*foundation.NSString]) *MLSequence
Creates a sequence of strings from a string array.
func (*MLSequence) Int64Values ¶
func (o *MLSequence) Int64Values() *foundation.NSArray[*foundation.NSNumber]
func (*MLSequence) StringValues ¶
func (o *MLSequence) StringValues() *foundation.NSArray[*foundation.NSString]
type MLSequenceConstraint ¶
type MLSequenceConstraint struct {
foundation.NSObject
}
The constraints for a sequence feature.
Apple documentation: https://developer.apple.com/documentation/coreml/mlsequenceconstraint
func MLSequenceConstraintFromID ¶
func MLSequenceConstraintFromID(id objc.ID) *MLSequenceConstraint
func (*MLSequenceConstraint) CountRange ¶
func (o *MLSequenceConstraint) CountRange() foundation.NSRange
func (*MLSequenceConstraint) ValueDescription ¶
func (o *MLSequenceConstraint) ValueDescription() *MLFeatureDescription
type MLSpecializationStrategy ¶
type MLSpecializationStrategy int64
The optimization strategy for the model specialization.
const ( // The strategy that works well for most applications. MLSpecializationStrategyDefault MLSpecializationStrategy = 0 // Prefer the prediction latency at the potential cost of specialization time, memory footprint, and the disk space usage of specialized artifacts. MLSpecializationStrategyFastPrediction MLSpecializationStrategy = 1 )
func (MLSpecializationStrategy) String ¶
func (e MLSpecializationStrategy) String() string
type MLState ¶
type MLState struct {
foundation.NSObject
}
Handle to the state buffers.
Apple documentation: https://developer.apple.com/documentation/coreml/mlstate
func MLStateFromID ¶
func (*MLState) GetMultiArrayForStateNamedHandler ¶
func (o *MLState) GetMultiArrayForStateNamedHandler(stateName *foundation.NSString, handler func(*MLMultiArray))
Gets a mutable view into a state buffer.
type MLStateConstraint ¶
type MLStateConstraint struct {
foundation.NSObject
}
Constraint of a state feature value.
Apple documentation: https://developer.apple.com/documentation/coreml/mlstateconstraint
func MLStateConstraintFromID ¶
func MLStateConstraintFromID(id objc.ID) *MLStateConstraint
func (*MLStateConstraint) BufferShape ¶
func (o *MLStateConstraint) BufferShape() *foundation.NSArray[*foundation.NSNumber]
The shape of the state buffer.
func (*MLStateConstraint) DataType ¶
func (o *MLStateConstraint) DataType() MLMultiArrayDataType
The data type of scalars in the state buffer.
type MLTask ¶
type MLTask struct {
foundation.NSObject
}
An abstract base class for machine learning tasks.
Apple documentation: https://developer.apple.com/documentation/coreml/mltask
func MLTaskFromID ¶
func (*MLTask) Cancel ¶
func (o *MLTask) Cancel()
Cancels a machine learning task before it completes.
func (*MLTask) State ¶
func (o *MLTask) State() MLTaskState
func (*MLTask) TaskIdentifier ¶
func (o *MLTask) TaskIdentifier() *foundation.NSString
type MLTaskState ¶
type MLTaskState int64
The state of a machine learning task.
const ( // The state of a machine learning task that’s paused. MLTaskStateSuspended MLTaskState = 1 // The state of a machine learning task that’s executing. MLTaskStateRunning MLTaskState = 2 // The state of a machine learning task that’s in mid-termination, before it could finish successfully. MLTaskStateCancelling MLTaskState = 3 // The state of a machine learning task that has finished successfully. MLTaskStateCompleted MLTaskState = 4 // The state of a machine learning task that has terminated due to an error. MLTaskStateFailed MLTaskState = 5 )
func (MLTaskState) String ¶
func (e MLTaskState) String() string
type MLUpdateContext ¶
type MLUpdateContext struct {
foundation.NSObject
}
The context an update task provides to your app’s completion and update progress handlers.
Apple documentation: https://developer.apple.com/documentation/coreml/mlupdatecontext
func MLUpdateContextFromID ¶
func MLUpdateContextFromID(id objc.ID) *MLUpdateContext
func (*MLUpdateContext) Event ¶
func (o *MLUpdateContext) Event() MLUpdateProgressEvent
func (*MLUpdateContext) Metrics ¶
func (o *MLUpdateContext) Metrics() *foundation.NSDictionary[*MLMetricKey, objc.ID]
func (*MLUpdateContext) Model ¶
func (o *MLUpdateContext) Model() *MLModel
func (*MLUpdateContext) Parameters ¶
func (o *MLUpdateContext) Parameters() *foundation.NSDictionary[*MLParameterKey, objc.ID]
func (*MLUpdateContext) Task ¶
func (o *MLUpdateContext) Task() *MLUpdateTask
type MLUpdateProgressEvent ¶
type MLUpdateProgressEvent int64
A type of event during a model update task.
const ( // An event that represents the start of training. MLUpdateProgressEventTrainingBegin MLUpdateProgressEvent = 1 // An event that represents the end of training epoch. MLUpdateProgressEventEpochEnd MLUpdateProgressEvent = 2 // An event that represents the end of a mini-batch within a training epoch. MLUpdateProgressEventMiniBatchEnd MLUpdateProgressEvent = 4 )
func (MLUpdateProgressEvent) String ¶
func (e MLUpdateProgressEvent) String() string
type MLUpdateProgressHandlers ¶
type MLUpdateProgressHandlers struct {
foundation.NSObject
}
A collection of closures an update task uses to notify your app of its progress.
Apple documentation: https://developer.apple.com/documentation/coreml/mlupdateprogresshandlers
func MLUpdateProgressHandlersFromID ¶
func MLUpdateProgressHandlersFromID(id objc.ID) *MLUpdateProgressHandlers
func (*MLUpdateProgressHandlers) InitForEventsProgressHandlerCompletionHandler ¶
func (o *MLUpdateProgressHandlers) InitForEventsProgressHandlerCompletionHandler(interestedEvents MLUpdateProgressEvent, progressHandler func(*MLUpdateContext), completionHandler func(*MLUpdateContext)) *MLUpdateProgressHandlers
Creates the collection of closures an update task uses to notify your app of its progress.
type MLUpdateTask ¶
type MLUpdateTask struct {
MLTask
}
A task that updates a model with additional training data.
Apple documentation: https://developer.apple.com/documentation/coreml/mlupdatetask
func MLUpdateTaskFromID ¶
func MLUpdateTaskFromID(id objc.ID) *MLUpdateTask
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataCompletionHandlerError ¶
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataCompletionHandlerError(modelURL *foundation.NSURL, trainingData MLBatchProvider, completionHandler func(*MLUpdateContext)) (*MLUpdateTask, error)
Creates a task that updates the model at the URL with the training data, and calls the completion handler when the update completes.
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataConfigurationCompletionHandlerError ¶
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataConfigurationCompletionHandlerError(modelURL *foundation.NSURL, trainingData MLBatchProvider, configuration *MLModelConfiguration, completionHandler func(*MLUpdateContext)) (*MLUpdateTask, error)
Creates a task that updates the model at the URL with the training data and configuration, and calls the completion handler when the update completes.
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataConfigurationProgressHandlersError ¶
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataConfigurationProgressHandlersError(modelURL *foundation.NSURL, trainingData MLBatchProvider, configuration *MLModelConfiguration, progressHandlers *MLUpdateProgressHandlers) (*MLUpdateTask, error)
Creates a task that updates the model at the URL with the training data and configuration, and calls the progress handlers during and after the update.
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataProgressHandlersError ¶
func MLUpdateTaskUpdateTaskForModelAtURLTrainingDataProgressHandlersError(modelURL *foundation.NSURL, trainingData MLBatchProvider, progressHandlers *MLUpdateProgressHandlers) (*MLUpdateTask, error)
Creates a task that updates the model at the URL with the training data, and calls the progress handlers during and after the update.
func (*MLUpdateTask) ResumeWithParameters ¶
func (o *MLUpdateTask) ResumeWithParameters(updateParameters *foundation.NSDictionary[*MLParameterKey, objc.ID])
Resumes a model update with updated parameter values.
type MTLCommandBuffer ¶
type MTLCommandBuffer interface {
}
MTLCommandBuffer wraps the ObjC protocol MTLCommandBuffer.
type Mach_vm_range_flags_t ¶
type Mach_vm_range_flags_t int64
const (
MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)
func (Mach_vm_range_flags_t) String ¶
func (e Mach_vm_range_flags_t) String() string
type Mach_vm_range_flavor_t ¶
type Mach_vm_range_flavor_t int64
const ( MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0 MACH_VM_RANGE_FLAVOR_V1 Mach_vm_range_flavor_t = 1 )
func (Mach_vm_range_flavor_t) String ¶
func (e Mach_vm_range_flavor_t) String() string
type Mach_vm_range_tag_t ¶
type Mach_vm_range_tag_t int64
const ( MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0 MACH_VM_RANGE_DATA Mach_vm_range_tag_t = 1 MACH_VM_RANGE_FIXED Mach_vm_range_tag_t = 2 )
func (Mach_vm_range_tag_t) String ¶
func (e Mach_vm_range_tag_t) String() string
type Mpo_flags_t ¶
type Mpo_flags_t int64
const ( MPO_PORT Mpo_flags_t = 0 MPO_SERVICE_PORT Mpo_flags_t = 1024 MPO_CONNECTION_PORT Mpo_flags_t = 2048 MPO_REPLY_PORT Mpo_flags_t = 4096 MPO_WEAK_REPLY_PORT Mpo_flags_t = 16384 MPO_NOTIFICATION_PORT Mpo_flags_t = 17408 MPO_EXCEPTION_PORT Mpo_flags_t = 32768 MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536 )
func (Mpo_flags_t) String ¶
func (e Mpo_flags_t) String() string
type NXMouseButton ¶
type NXMouseButton int64
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
type Os_clockid_t ¶
type Os_clockid_t int64
const (
OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)
func (Os_clockid_t) String ¶
func (e Os_clockid_t) String() string
type PMPageToPaperMappingType ¶
type PMPageToPaperMappingType int64
const ( KPMPageToPaperMappingNone PMPageToPaperMappingType = 1 KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2 )
func (PMPageToPaperMappingType) String ¶
func (e PMPageToPaperMappingType) String() string
type Ptrauth_key ¶
type Ptrauth_key int64
const ( Ptrauth_key_none Ptrauth_key = -1 Ptrauth_key_asia Ptrauth_key = 0 Ptrauth_key_asib Ptrauth_key = 1 Ptrauth_key_asda Ptrauth_key = 2 Ptrauth_key_asdb Ptrauth_key = 3 Ptrauth_key_process_independent_code Ptrauth_key = 0 Ptrauth_key_process_dependent_code Ptrauth_key = 1 Ptrauth_key_process_independent_data Ptrauth_key = 2 Ptrauth_key_process_dependent_data Ptrauth_key = 3 Ptrauth_key_return_address Ptrauth_key = 1 Ptrauth_key_frame_pointer Ptrauth_key = 3 Ptrauth_key_function_pointer Ptrauth_key = 0 Ptrauth_key_block_function Ptrauth_key = 0 Ptrauth_key_cxx_vtable_pointer Ptrauth_key = 2 Ptrauth_key_method_list_pointer Ptrauth_key = 2 Ptrauth_key_objc_isa_pointer Ptrauth_key = 2 Ptrauth_key_objc_super_pointer Ptrauth_key = 2 Ptrauth_key_objc_sel_pointer Ptrauth_key = 3 Ptrauth_key_objc_class_ro_pointer Ptrauth_key = 2 Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2 Ptrauth_key_init_fini_pointer Ptrauth_key = 0 )
func (Ptrauth_key) String ¶
func (e Ptrauth_key) String() string
type Qos_class_t ¶
type Qos_class_t uint32
const ( QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33 QOS_CLASS_USER_INITIATED Qos_class_t = 25 QOS_CLASS_DEFAULT Qos_class_t = 21 QOS_CLASS_UTILITY Qos_class_t = 17 QOS_CLASS_BACKGROUND Qos_class_t = 9 QOS_CLASS_UNSPECIFIED Qos_class_t = 0 )
func (Qos_class_t) String ¶
func (e Qos_class_t) String() string
type Virtual_memory_guard_exception_code_t ¶
type Virtual_memory_guard_exception_code_t int64
const ( KGUARD_EXC_DEALLOC_GAP Virtual_memory_guard_exception_code_t = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE Virtual_memory_guard_exception_code_t = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE Virtual_memory_guard_exception_code_t = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE Virtual_memory_guard_exception_code_t = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE Virtual_memory_guard_exception_code_t = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE Virtual_memory_guard_exception_code_t = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE Virtual_memory_guard_exception_code_t = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION Virtual_memory_guard_exception_code_t = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY Virtual_memory_guard_exception_code_t = 13 KGUARD_EXC_SEC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 99 KGUARD_EXC_SEC_COPY_DENIED Virtual_memory_guard_exception_code_t = 100 KGUARD_EXC_SEC_SHARING_DENIED Virtual_memory_guard_exception_code_t = 101 KGUARD_EXC_MTE_SYNC_FAULT Virtual_memory_guard_exception_code_t = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204 )
func (Virtual_memory_guard_exception_code_t) String ¶
func (e Virtual_memory_guard_exception_code_t) String() string
type Xpc_listener_create_flags_t ¶
type Xpc_listener_create_flags_t int64
const ( XPC_LISTENER_CREATE_NONE Xpc_listener_create_flags_t = 0 XPC_LISTENER_CREATE_INACTIVE Xpc_listener_create_flags_t = 1 XPC_LISTENER_CREATE_FORCE_MACH Xpc_listener_create_flags_t = 2 XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4 )
func (Xpc_listener_create_flags_t) String ¶
func (e Xpc_listener_create_flags_t) String() string
type Xpc_session_create_flags_t ¶
type Xpc_session_create_flags_t int64
const ( XPC_SESSION_CREATE_NONE Xpc_session_create_flags_t = 0 XPC_SESSION_CREATE_INACTIVE Xpc_session_create_flags_t = 1 XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2 )
func (Xpc_session_create_flags_t) String ¶
func (e Xpc_session_create_flags_t) String() string
Source Files
¶
- MLArrayBatchProvider.go
- MLCPUComputeDevice.go
- MLComputePlan.go
- MLComputePlanCost.go
- MLComputePlanDeviceUsage.go
- MLDictionaryConstraint.go
- MLDictionaryFeatureProvider.go
- MLFeatureDescription.go
- MLFeatureValue.go
- MLGPUComputeDevice.go
- MLImageConstraint.go
- MLImageSize.go
- MLImageSizeConstraint.go
- MLKey.go
- MLMetricKey.go
- MLModel.go
- MLModelAsset.go
- MLModelConfiguration.go
- MLModelDescription.go
- MLModelStructure.go
- MLModelStructureNeuralNetwork.go
- MLModelStructureNeuralNetworkLayer.go
- MLModelStructurePipeline.go
- MLModelStructureProgram.go
- MLModelStructureProgramArgument.go
- MLModelStructureProgramBinding.go
- MLModelStructureProgramBlock.go
- MLModelStructureProgramFunction.go
- MLModelStructureProgramNamedValueType.go
- MLModelStructureProgramOperation.go
- MLModelStructureProgramValue.go
- MLModelStructureProgramValueType.go
- MLMultiArray.go
- MLMultiArrayConstraint.go
- MLMultiArrayShapeConstraint.go
- MLNeuralEngineComputeDevice.go
- MLNumericConstraint.go
- MLOptimizationHints.go
- MLParameterDescription.go
- MLParameterKey.go
- MLPredictionOptions.go
- MLSequence.go
- MLSequenceConstraint.go
- MLState.go
- MLStateConstraint.go
- MLTask.go
- MLUpdateContext.go
- MLUpdateProgressHandlers.go
- MLUpdateTask.go
- coreml_enums.go
- coreml_externs.go
- coreml_functions.go
- coreml_protocols.go
- coreml_runtime.go
- doc.go