coreml

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package coreml provides a fluent Go API over the macOS CoreML framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableComputeDevices added in v0.17.0

func AvailableComputeDevices() []obj.Object

AvailableComputeDevices returns the available compute devices.

func CompileModelAtURL added in v0.17.0

func CompileModelAtURL(modelURL string) (result string, err error)

CompileModelAtURL compile a .mlmodel for this device The returned model can be loaded using:

func MLAllComputeDevices

func MLAllComputeDevices() []obj.Object

MLAllComputeDevices calls the CoreML framework function MLAllComputeDevices.

func MLFeatureValueImageOptionCropAndScale

func MLFeatureValueImageOptionCropAndScale() obj.Object

MLFeatureValueImageOptionCropAndScale returns the string constant MLFeatureValueImageOptionCropAndScale, for use as a dictionary key or argument.

func MLFeatureValueImageOptionCropRect

func MLFeatureValueImageOptionCropRect() obj.Object

MLFeatureValueImageOptionCropRect returns the string constant MLFeatureValueImageOptionCropRect, for use as a dictionary key or argument.

func MLModelAuthorKey

func MLModelAuthorKey() obj.Object

MLModelAuthorKey returns the string constant MLModelAuthorKey, for use as a dictionary key or argument.

func MLModelCompileModelAtURL added in v0.17.0

func MLModelCompileModelAtURL(ctx context.Context, modelURL string) (result obj.Object, err error)

MLModelCompileModelAtURL wraps the corresponding Objective-C method.

MLModelCompileModelAtURL blocks until the operation completes or ctx is cancelled.

func MLModelCreatorDefinedKey

func MLModelCreatorDefinedKey() obj.Object

MLModelCreatorDefinedKey returns the string constant MLModelCreatorDefinedKey, for use as a dictionary key or argument.

func MLModelDescriptionKey

func MLModelDescriptionKey() obj.Object

MLModelDescriptionKey returns the string constant MLModelDescriptionKey, for use as a dictionary key or argument.

func MLModelErrorDomain

func MLModelErrorDomain() obj.Object

MLModelErrorDomain returns the string constant MLModelErrorDomain, for use as a dictionary key or argument.

func MLModelLicenseKey

func MLModelLicenseKey() obj.Object

MLModelLicenseKey returns the string constant MLModelLicenseKey, for use as a dictionary key or argument.

func MLModelVersionStringKey

func MLModelVersionStringKey() obj.Object

MLModelVersionStringKey returns the string constant MLModelVersionStringKey, for use as a dictionary key or argument.

Types

type ArrayBatchProvider added in v0.17.0

type ArrayBatchProvider struct {
	objref.Handle
}

ArrayBatchProvider is an idiomatic wrapper over the Objective-C class MLArrayBatchProvider.

A convenience wrapper for batches of feature providers.

func ArrayBatchProviderFromID added in v0.17.0

func ArrayBatchProviderFromID(id objc.ID) *ArrayBatchProvider

ArrayBatchProviderFromID adopts an existing Objective-C object as a ArrayBatchProvider (nil for 0), retaining it and registering a release finalizer.

func NewArrayBatchProviderWithDictionary added in v0.17.0

func NewArrayBatchProviderWithDictionary(dictionary map[string]obj.Object) (result *ArrayBatchProvider, err error)

NewArrayBatchProviderWithDictionary creates a batch provider based on feature names and their associated arrays of data.

func NewArrayBatchProviderWithFeatureProviderArray added in v0.17.0

func NewArrayBatchProviderWithFeatureProviderArray(array []obj.Object) *ArrayBatchProvider

NewArrayBatchProviderWithFeatureProviderArray creates the batch provider based on the array of feature providers.

func (*ArrayBatchProvider) Array added in v0.17.0

func (abp *ArrayBatchProvider) Array() []obj.Object

Array returns the array.

func (*ArrayBatchProvider) Description added in v0.17.0

func (abp *ArrayBatchProvider) Description() string

Description returns the object's -description text.

func (*ArrayBatchProvider) IsEqual added in v0.17.0

func (abp *ArrayBatchProvider) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ArrayBatchProvider) IsKind added in v0.17.0

func (abp *ArrayBatchProvider) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ArrayBatchProvider) String added in v0.17.0

func (abp *ArrayBatchProvider) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type BatchProvider added in v0.17.0

type BatchProvider interface {
	FeaturesAtIndex(index int) obj.Object
	Count() int
}

BatchProvider is the Go form of the Objective-C protocol MLBatchProvider.

type CPUComputeDevice added in v0.17.0

type CPUComputeDevice struct {
	objref.Handle
}

CPUComputeDevice is an idiomatic wrapper over the Objective-C class MLCPUComputeDevice.

An object that represents a CPU compute device.

func CPUComputeDeviceFromID added in v0.17.0

func CPUComputeDeviceFromID(id objc.ID) *CPUComputeDevice

CPUComputeDeviceFromID adopts an existing Objective-C object as a CPUComputeDevice (nil for 0), retaining it and registering a release finalizer.

func NewCPUComputeDevice added in v0.17.0

func NewCPUComputeDevice() *CPUComputeDevice

NewCPUComputeDevice creates a new CPUComputeDevice.

func (*CPUComputeDevice) Description added in v0.17.0

func (ccd *CPUComputeDevice) Description() string

Description returns the object's -description text.

func (*CPUComputeDevice) IsEqual added in v0.17.0

func (ccd *CPUComputeDevice) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*CPUComputeDevice) IsKind added in v0.17.0

func (ccd *CPUComputeDevice) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*CPUComputeDevice) String added in v0.17.0

func (ccd *CPUComputeDevice) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type ComputeDeviceProtocol added in v0.17.0

type ComputeDeviceProtocol interface {
}

ComputeDeviceProtocol is the Go form of the Objective-C protocol MLComputeDeviceProtocol.

type ComputePlan added in v0.17.0

type ComputePlan struct {
	objref.Handle
}

ComputePlan is an idiomatic wrapper over the Objective-C class MLComputePlan.

A class representing the compute plan of a model.

func ComputePlanFromID added in v0.17.0

func ComputePlanFromID(id objc.ID) *ComputePlan

ComputePlanFromID adopts an existing Objective-C object as a ComputePlan (nil for 0), retaining it and registering a release finalizer.

func LoadContentsOfURLConfiguration added in v0.17.0

func LoadContentsOfURLConfiguration(ctx context.Context, url string, configuration *ModelConfiguration) (result *ComputePlan, err error)

LoadContentsOfURLConfiguration construct the compute plan of a model asynchronously given the location of its on-disk representation.

LoadContentsOfURLConfiguration blocks until the operation completes or ctx is cancelled.

func LoadModelAssetConfiguration added in v0.17.0

func LoadModelAssetConfiguration(ctx context.Context, asset *ModelAsset, configuration *ModelConfiguration) (result *ComputePlan, err error)

LoadModelAssetConfiguration construct the compute plan of a model asynchronously given the model asset.

LoadModelAssetConfiguration blocks until the operation completes or ctx is cancelled.

func NewComputePlan added in v0.17.0

func NewComputePlan() *ComputePlan

NewComputePlan creates a new ComputePlan.

func (*ComputePlan) ComputeDeviceUsageForMLProgramOperation added in v0.17.0

func (cp *ComputePlan) ComputeDeviceUsageForMLProgramOperation(operation *ModelStructureProgramOperation) *ComputePlanDeviceUsage

ComputeDeviceUsageForMLProgramOperation returns The anticipated compute devices that would be used for executing an ML Program operation.

func (*ComputePlan) ComputeDeviceUsageForNeuralNetworkLayer added in v0.17.0

func (cp *ComputePlan) ComputeDeviceUsageForNeuralNetworkLayer(layer *ModelStructureNeuralNetworkLayer) *ComputePlanDeviceUsage

ComputeDeviceUsageForNeuralNetworkLayer returns the anticipated compute devices that would be used for executing a NeuralNetwork layer.

func (*ComputePlan) Description added in v0.17.0

func (cp *ComputePlan) Description() string

Description returns the object's -description text.

func (*ComputePlan) EstimatedCostOfMLProgramOperation added in v0.17.0

func (cp *ComputePlan) EstimatedCostOfMLProgramOperation(operation *ModelStructureProgramOperation) *ComputePlanCost

EstimatedCostOfMLProgramOperation returns the estimated cost of executing an ML Program operation.

func (*ComputePlan) IsEqual added in v0.17.0

func (cp *ComputePlan) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ComputePlan) IsKind added in v0.17.0

func (cp *ComputePlan) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ComputePlan) ModelStructure added in v0.17.0

func (cp *ComputePlan) ModelStructure() *ModelStructure

ModelStructure returns the model structure.

func (*ComputePlan) String added in v0.17.0

func (cp *ComputePlan) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ComputePlanCost added in v0.17.0

type ComputePlanCost struct {
	objref.Handle
}

ComputePlanCost is an idiomatic wrapper over the Objective-C class MLComputePlanCost.

A class that represents the estimated cost of executing a layer or operation.

func ComputePlanCostFromID added in v0.17.0

func ComputePlanCostFromID(id objc.ID) *ComputePlanCost

ComputePlanCostFromID adopts an existing Objective-C object as a ComputePlanCost (nil for 0), retaining it and registering a release finalizer.

func NewComputePlanCost added in v0.17.0

func NewComputePlanCost() *ComputePlanCost

NewComputePlanCost creates a new ComputePlanCost.

func (*ComputePlanCost) Description added in v0.17.0

func (cpc *ComputePlanCost) Description() string

Description returns the object's -description text.

func (*ComputePlanCost) IsEqual added in v0.17.0

func (cpc *ComputePlanCost) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ComputePlanCost) IsKind added in v0.17.0

func (cpc *ComputePlanCost) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ComputePlanCost) String added in v0.17.0

func (cpc *ComputePlanCost) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ComputePlanCost) Weight added in v0.17.0

func (cpc *ComputePlanCost) Weight() float64

Weight returns the weight.

type ComputePlanDeviceUsage added in v0.17.0

type ComputePlanDeviceUsage struct {
	objref.Handle
}

ComputePlanDeviceUsage is an idiomatic wrapper over the Objective-C class MLComputePlanDeviceUsage.

The anticipated compute devices to use for executing a layer or operation.

func ComputePlanDeviceUsageFromID added in v0.17.0

func ComputePlanDeviceUsageFromID(id objc.ID) *ComputePlanDeviceUsage

ComputePlanDeviceUsageFromID adopts an existing Objective-C object as a ComputePlanDeviceUsage (nil for 0), retaining it and registering a release finalizer.

func NewComputePlanDeviceUsage added in v0.17.0

func NewComputePlanDeviceUsage() *ComputePlanDeviceUsage

NewComputePlanDeviceUsage creates a new ComputePlanDeviceUsage.

func (*ComputePlanDeviceUsage) Description added in v0.17.0

func (cpdu *ComputePlanDeviceUsage) Description() string

Description returns the object's -description text.

func (*ComputePlanDeviceUsage) IsEqual added in v0.17.0

func (cpdu *ComputePlanDeviceUsage) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ComputePlanDeviceUsage) IsKind added in v0.17.0

func (cpdu *ComputePlanDeviceUsage) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ComputePlanDeviceUsage) String added in v0.17.0

func (cpdu *ComputePlanDeviceUsage) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ComputePlanDeviceUsage) SupportedComputeDevices added in v0.17.0

func (cpdu *ComputePlanDeviceUsage) SupportedComputeDevices() []obj.Object

SupportedComputeDevices returns the compute devices that can execute the layer/operation.

type ComputeUnits added in v0.17.0

type ComputeUnits 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.
	ComputeUnitsCPUOnly ComputeUnits = 0
	// The option you choose to allow the model to use both the CPU and GPU, but not the neural engine.
	ComputeUnitsCPUAndGPU ComputeUnits = 1
	// The option you choose to allow the model to use all compute units available, including the neural engine.
	ComputeUnitsAll ComputeUnits = 2
	// The option you choose to allow the model to use both the CPU and neural engine, but not the GPU.
	ComputeUnitsCPUAndNeuralEngine ComputeUnits = 3
)

func (ComputeUnits) String added in v0.17.0

func (e ComputeUnits) String() string

String returns the ComputeUnits constant's name, or its numeric form when the value is not a known constant.

type CustomLayer added in v0.17.0

type CustomLayer interface {
	InitWithParameterDictionaryError(parameters map[string]obj.Object) unsafe.Pointer
	SetWeightDataError(weights [][]byte) bool
	OutputShapesForInputShapesError(inputShapes []obj.Object) []obj.Object
	EvaluateOnCPUWithInputsOutputsError(inputs []*MultiArray, outputs []*MultiArray) bool
}

CustomLayer is the Go form of the Objective-C protocol MLCustomLayer.

type CustomModel added in v0.17.0

type CustomModel interface {
	InitWithModelDescriptionParameterDictionaryError(modelDescription *ModelDescription, parameters map[string]obj.Object) unsafe.Pointer
	PredictionFromFeaturesOptionsError(input obj.Object, options *PredictionOptions) obj.Object
}

CustomModel is the Go form of the Objective-C protocol MLCustomModel.

type DictionaryConstraint added in v0.17.0

type DictionaryConstraint struct {
	objref.Handle
}

DictionaryConstraint is an idiomatic wrapper over the Objective-C class MLDictionaryConstraint.

The constraint on the keys for a dictionary feature.

func DictionaryConstraintFromID added in v0.17.0

func DictionaryConstraintFromID(id objc.ID) *DictionaryConstraint

DictionaryConstraintFromID adopts an existing Objective-C object as a DictionaryConstraint (nil for 0), retaining it and registering a release finalizer.

func NewDictionaryConstraint added in v0.17.0

func NewDictionaryConstraint() *DictionaryConstraint

NewDictionaryConstraint creates a new DictionaryConstraint.

func (*DictionaryConstraint) Description added in v0.17.0

func (dc *DictionaryConstraint) Description() string

Description returns the object's -description text.

func (*DictionaryConstraint) IsEqual added in v0.17.0

func (dc *DictionaryConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DictionaryConstraint) IsKind added in v0.17.0

func (dc *DictionaryConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DictionaryConstraint) KeyType added in v0.17.0

func (dc *DictionaryConstraint) KeyType() FeatureType

KeyType returns the key type.

func (*DictionaryConstraint) String added in v0.17.0

func (dc *DictionaryConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type DictionaryFeatureProvider added in v0.17.0

type DictionaryFeatureProvider struct {
	objref.Handle
}

DictionaryFeatureProvider is an idiomatic wrapper over the Objective-C class MLDictionaryFeatureProvider.

A convenience wrapper for the given dictionary of data.

func DictionaryFeatureProviderFromID added in v0.17.0

func DictionaryFeatureProviderFromID(id objc.ID) *DictionaryFeatureProvider

DictionaryFeatureProviderFromID adopts an existing Objective-C object as a DictionaryFeatureProvider (nil for 0), retaining it and registering a release finalizer.

func NewDictionaryFeatureProviderWithDictionary added in v0.17.0

func NewDictionaryFeatureProviderWithDictionary(dictionary map[string]obj.Object) (result *DictionaryFeatureProvider, err error)

NewDictionaryFeatureProviderWithDictionary creates the feature provider based on a dictionary.

func (*DictionaryFeatureProvider) Description added in v0.17.0

func (dfp *DictionaryFeatureProvider) Description() string

Description returns the object's -description text.

func (*DictionaryFeatureProvider) Dictionary added in v0.17.0

func (dfp *DictionaryFeatureProvider) Dictionary() map[string]*FeatureValue

Dictionary returns dictionary holding the feature values

func (*DictionaryFeatureProvider) IsEqual added in v0.17.0

func (dfp *DictionaryFeatureProvider) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DictionaryFeatureProvider) IsKind added in v0.17.0

func (dfp *DictionaryFeatureProvider) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DictionaryFeatureProvider) ObjectForKeyedSubscript added in v0.17.0

func (dfp *DictionaryFeatureProvider) ObjectForKeyedSubscript(featureName string) *FeatureValue

ObjectForKeyedSubscript subscript interface for the feature provider to pass through to the dictionary.

func (*DictionaryFeatureProvider) String added in v0.17.0

func (dfp *DictionaryFeatureProvider) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type EvCmd

type EvCmd int32
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

String returns the EvCmd constant's name, or its numeric form when the value is not a known constant.

type FeatureDescription added in v0.17.0

type FeatureDescription struct {
	objref.Handle
}

FeatureDescription is an idiomatic wrapper over the Objective-C class MLFeatureDescription.

The name, type, and constraints of an input or output feature.

func FeatureDescriptionFromID added in v0.17.0

func FeatureDescriptionFromID(id objc.ID) *FeatureDescription

FeatureDescriptionFromID adopts an existing Objective-C object as a FeatureDescription (nil for 0), retaining it and registering a release finalizer.

func NewFeatureDescription added in v0.17.0

func NewFeatureDescription() *FeatureDescription

NewFeatureDescription creates a new FeatureDescription.

func (*FeatureDescription) Description added in v0.17.0

func (fd *FeatureDescription) Description() string

Description returns the object's -description text.

func (*FeatureDescription) DictionaryConstraint added in v0.17.0

func (fd *FeatureDescription) DictionaryConstraint() *DictionaryConstraint

DictionaryConstraint returns constraint when type == MLFeatureTypeDictionary, nil otherwise

func (*FeatureDescription) ImageConstraint added in v0.17.0

func (fd *FeatureDescription) ImageConstraint() *ImageConstraint

ImageConstraint returns constraint when type == MLFeatureTypeImage, nil otherwise

func (*FeatureDescription) IsAllowedValue added in v0.17.0

func (fd *FeatureDescription) IsAllowedValue(value *FeatureValue) bool

IsAllowedValue checks whether the model will accept an input feature value.

func (*FeatureDescription) IsEqual added in v0.17.0

func (fd *FeatureDescription) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*FeatureDescription) IsKind added in v0.17.0

func (fd *FeatureDescription) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*FeatureDescription) IsOptional added in v0.17.0

func (fd *FeatureDescription) IsOptional() bool

IsOptional reports whether this feature can take an undefined value or not

func (*FeatureDescription) MultiArrayConstraint added in v0.17.0

func (fd *FeatureDescription) MultiArrayConstraint() *MultiArrayConstraint

MultiArrayConstraint returns constraint when type == MLFeatureTypeMultiArray, nil otherwise

func (*FeatureDescription) Name added in v0.17.0

func (fd *FeatureDescription) Name() string

Name returns name of feature

func (*FeatureDescription) SequenceConstraint added in v0.17.0

func (fd *FeatureDescription) SequenceConstraint() *SequenceConstraint

SequenceConstraint returns constraint when type == MLFeatureTypeSequence, nil otherwise

func (*FeatureDescription) StateConstraint added in v0.17.0

func (fd *FeatureDescription) StateConstraint() *StateConstraint

StateConstraint returns the state feature value constraint. The property has a value when `.type == MLFeatureTypeState`.

func (*FeatureDescription) String added in v0.17.0

func (fd *FeatureDescription) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*FeatureDescription) Type added in v0.17.0

func (fd *FeatureDescription) Type() FeatureType

Type returns type of data

type FeatureProvider added in v0.17.0

type FeatureProvider interface {
}

FeatureProvider is the Go form of the Objective-C protocol MLFeatureProvider.

type FeatureType added in v0.17.0

type FeatureType int64

The possible types for feature values, input features, and output features.

const (
	// The type for invalid feature values.
	FeatureTypeInvalid FeatureType = 0
	// The type for integer features and feature values.
	FeatureTypeInt64 FeatureType = 1
	// The type for double features and feature values.
	FeatureTypeDouble FeatureType = 2
	// The type for string features and feature values.
	FeatureTypeString FeatureType = 3
	// The type for image features and feature values.
	FeatureTypeImage FeatureType = 4
	// The type for multidimensional array features and feature values.
	FeatureTypeMultiArray FeatureType = 5
	// The type for dictionary features and feature values.
	FeatureTypeDictionary FeatureType = 6
	// The type for sequence features and feature values.
	FeatureTypeSequence FeatureType = 7
	// MLState. Represents a model state that may be updated in each inference.
	FeatureTypeState FeatureType = 8
)

func (FeatureType) String added in v0.17.0

func (e FeatureType) String() string

String returns the FeatureType constant's name, or its numeric form when the value is not a known constant.

type FeatureValue added in v0.17.0

type FeatureValue struct {
	objref.Handle
}

FeatureValue is an idiomatic wrapper over the Objective-C class MLFeatureValue.

A generic wrapper around an underlying value and the value’s type.

func FeatureValueFromID added in v0.17.0

func FeatureValueFromID(id objc.ID) *FeatureValue

FeatureValueFromID adopts an existing Objective-C object as a FeatureValue (nil for 0), retaining it and registering a release finalizer.

func FeatureValueWithCGImageConstraintOptions added in v0.17.0

func FeatureValueWithCGImageConstraintOptions(cgImage coregraphics.CGImageRef, constraint *ImageConstraint, options obj.Object) (result *FeatureValue, err error)

FeatureValueWithCGImageConstraintOptions construct image feature value from CGImage, using the size and type information required by feature description (orientation is assumed to be kCGImagePropertyOrientationUp)

func FeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptions added in v0.17.0

func FeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptions(cgImage coregraphics.CGImageRef, pixelsWide int, pixelsHigh int, pixelFormatType int, options obj.Object) (result *FeatureValue, err error)

FeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptions construct image feature value from CGImage (orientation is assumed to be kCGImagePropertyOrientationUp)

func FeatureValueWithDictionary added in v0.17.0

func FeatureValueWithDictionary(value obj.Object) (result *FeatureValue, err error)

FeatureValueWithDictionary creates a feature value that contains a dictionary of numbers.

func FeatureValueWithDouble added in v0.17.0

func FeatureValueWithDouble(value float64) *FeatureValue

FeatureValueWithDouble creates a feature value that contains a double.

func FeatureValueWithImageAtURLConstraintOptions added in v0.17.0

func FeatureValueWithImageAtURLConstraintOptions(url string, constraint *ImageConstraint, options obj.Object) (result *FeatureValue, err error)

FeatureValueWithImageAtURLConstraintOptions construct image feature value from an image on disk, using a model specified image constraint. Orientation is read from Exif if avaiable

func FeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptions added in v0.17.0

func FeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptions(url string, pixelsWide int, pixelsHigh int, pixelFormatType int, options obj.Object) (result *FeatureValue, err error)

FeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptions construct image feature value from an image on disk. Orientation is read from Exif if avaiable

func FeatureValueWithInt64 added in v0.17.0

func FeatureValueWithInt64(value int64) *FeatureValue

FeatureValueWithInt64 creates a feature value that contains an integer.

func FeatureValueWithMultiArray added in v0.17.0

func FeatureValueWithMultiArray(value *MultiArray) *FeatureValue

FeatureValueWithMultiArray creates a feature value that contains a multidimensional array.

func FeatureValueWithPixelBuffer added in v0.17.0

func FeatureValueWithPixelBuffer(value unsafe.Pointer) *FeatureValue

FeatureValueWithPixelBuffer creates a feature value that contains an image from a pixel buffer.

func FeatureValueWithSequence added in v0.17.0

func FeatureValueWithSequence(sequence *Sequence) *FeatureValue

FeatureValueWithSequence creates a feature value that contains a sequence.

func FeatureValueWithString added in v0.17.0

func FeatureValueWithString(value string) *FeatureValue

FeatureValueWithString creates a feature value that contains a string.

func NewFeatureValue added in v0.17.0

func NewFeatureValue() *FeatureValue

NewFeatureValue creates a new FeatureValue.

func UndefinedFeatureValueWithType added in v0.17.0

func UndefinedFeatureValueWithType(type_ FeatureType) *FeatureValue

UndefinedFeatureValueWithType creates a feature value with a type that represents an undefined or missing value.

func (*FeatureValue) Description added in v0.17.0

func (fv *FeatureValue) Description() string

Description returns the object's -description text.

func (*FeatureValue) DictionaryValue added in v0.17.0

func (fv *FeatureValue) DictionaryValue() obj.Object

DictionaryValue returns populated value if the type is MLFeatureTypeDictionary

func (*FeatureValue) DoubleValue added in v0.17.0

func (fv *FeatureValue) DoubleValue() float64

DoubleValue returns populated value if the type is MLFeatureTypeDouble

func (*FeatureValue) ImageBufferValue added in v0.18.0

func (fv *FeatureValue) ImageBufferValue() unsafe.Pointer

ImageBufferValue returns populated value if the type is MLFeatureTypeImage

func (*FeatureValue) Int64Value added in v0.17.0

func (fv *FeatureValue) Int64Value() int64

Int64Value returns populated value if the type is MLFeatureTypeInt64

func (*FeatureValue) IsEqual added in v0.17.0

func (fv *FeatureValue) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*FeatureValue) IsEqualToFeatureValue added in v0.17.0

func (fv *FeatureValue) IsEqualToFeatureValue(value *FeatureValue) bool

IsEqualToFeatureValue returns a Boolean value that indicates whether a feature value is equal to another.

func (*FeatureValue) IsKind added in v0.17.0

func (fv *FeatureValue) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*FeatureValue) IsUndefined added in v0.17.0

func (fv *FeatureValue) IsUndefined() bool

IsUndefined reports whether the value represents a missing or undefined value

func (*FeatureValue) MultiArrayValue added in v0.17.0

func (fv *FeatureValue) MultiArrayValue() *MultiArray

MultiArrayValue returns populated value if the type is MLFeatureTypeMultiArray

func (*FeatureValue) SequenceValue added in v0.17.0

func (fv *FeatureValue) SequenceValue() *Sequence

SequenceValue returns populated value if the type is MLFeatureTypeSequence

func (*FeatureValue) String added in v0.17.0

func (fv *FeatureValue) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*FeatureValue) StringValue added in v0.17.0

func (fv *FeatureValue) StringValue() string

StringValue returns populated value if the type is MLFeatureTypeString

func (*FeatureValue) Type added in v0.17.0

func (fv *FeatureValue) Type() FeatureType

Type returns type of the value for which the corresponding property below is held

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type GPUComputeDevice added in v0.17.0

type GPUComputeDevice struct {
	objref.Handle
}

GPUComputeDevice is an idiomatic wrapper over the Objective-C class MLGPUComputeDevice.

An object that represents a GPU compute device.

func GPUComputeDeviceFromID added in v0.17.0

func GPUComputeDeviceFromID(id objc.ID) *GPUComputeDevice

GPUComputeDeviceFromID adopts an existing Objective-C object as a GPUComputeDevice (nil for 0), retaining it and registering a release finalizer.

func NewGPUComputeDevice added in v0.17.0

func NewGPUComputeDevice() *GPUComputeDevice

NewGPUComputeDevice creates a new GPUComputeDevice.

func (*GPUComputeDevice) Description added in v0.17.0

func (gcd *GPUComputeDevice) Description() string

Description returns the object's -description text.

func (*GPUComputeDevice) IsEqual added in v0.17.0

func (gcd *GPUComputeDevice) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*GPUComputeDevice) IsKind added in v0.17.0

func (gcd *GPUComputeDevice) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*GPUComputeDevice) String added in v0.17.0

func (gcd *GPUComputeDevice) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type ImageConstraint added in v0.17.0

type ImageConstraint struct {
	objref.Handle
}

ImageConstraint is an idiomatic wrapper over the Objective-C class MLImageConstraint.

The width, height, and pixel format constraints of an image feature.

func ImageConstraintFromID added in v0.17.0

func ImageConstraintFromID(id objc.ID) *ImageConstraint

ImageConstraintFromID adopts an existing Objective-C object as a ImageConstraint (nil for 0), retaining it and registering a release finalizer.

func NewImageConstraint added in v0.17.0

func NewImageConstraint() *ImageConstraint

NewImageConstraint creates a new ImageConstraint.

func (*ImageConstraint) Description added in v0.17.0

func (ic *ImageConstraint) Description() string

Description returns the object's -description text.

func (*ImageConstraint) IsEqual added in v0.17.0

func (ic *ImageConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ImageConstraint) IsKind added in v0.17.0

func (ic *ImageConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ImageConstraint) PixelFormatType added in v0.17.0

func (ic *ImageConstraint) PixelFormatType() int

PixelFormatType returns the accepted kCVPixelFormatType for the image.

func (*ImageConstraint) PixelsHigh added in v0.17.0

func (ic *ImageConstraint) PixelsHigh() int

PixelsHigh returns the required or default height of the image

func (*ImageConstraint) PixelsWide added in v0.17.0

func (ic *ImageConstraint) PixelsWide() int

PixelsWide returns the required or default width of the image

func (*ImageConstraint) SizeConstraint added in v0.17.0

func (ic *ImageConstraint) SizeConstraint() *ImageSizeConstraint

SizeConstraint returns detailed image size constraint

func (*ImageConstraint) String added in v0.17.0

func (ic *ImageConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ImageSize added in v0.17.0

type ImageSize struct {
	objref.Handle
}

ImageSize is an idiomatic wrapper over the Objective-C class MLImageSize.

The width and height of an image feature size.

func ImageSizeFromID added in v0.17.0

func ImageSizeFromID(id objc.ID) *ImageSize

ImageSizeFromID adopts an existing Objective-C object as a ImageSize (nil for 0), retaining it and registering a release finalizer.

func NewImageSize added in v0.17.0

func NewImageSize() *ImageSize

NewImageSize creates a new ImageSize.

func (*ImageSize) Description added in v0.17.0

func (is *ImageSize) Description() string

Description returns the object's -description text.

func (*ImageSize) IsEqual added in v0.17.0

func (is *ImageSize) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ImageSize) IsKind added in v0.17.0

func (is *ImageSize) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ImageSize) PixelsHigh added in v0.17.0

func (is *ImageSize) PixelsHigh() int

PixelsHigh returns the pixels high.

func (*ImageSize) PixelsWide added in v0.17.0

func (is *ImageSize) PixelsWide() int

PixelsWide returns the pixels wide.

func (*ImageSize) String added in v0.17.0

func (is *ImageSize) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ImageSizeConstraint added in v0.17.0

type ImageSizeConstraint struct {
	objref.Handle
}

ImageSizeConstraint is an idiomatic wrapper over the Objective-C class MLImageSizeConstraint.

A list or range of sizes that augment an image constraint’s default size.

func ImageSizeConstraintFromID added in v0.17.0

func ImageSizeConstraintFromID(id objc.ID) *ImageSizeConstraint

ImageSizeConstraintFromID adopts an existing Objective-C object as a ImageSizeConstraint (nil for 0), retaining it and registering a release finalizer.

func NewImageSizeConstraint added in v0.17.0

func NewImageSizeConstraint() *ImageSizeConstraint

NewImageSizeConstraint creates a new ImageSizeConstraint.

func (*ImageSizeConstraint) Description added in v0.17.0

func (isc *ImageSizeConstraint) Description() string

Description returns the object's -description text.

func (*ImageSizeConstraint) EnumeratedImageSizes added in v0.17.0

func (isc *ImageSizeConstraint) EnumeratedImageSizes() []*ImageSize

EnumeratedImageSizes returns the enumerated image sizes.

EnumeratedImageSizes returns the collection as a Go slice.

func (*ImageSizeConstraint) IsEqual added in v0.17.0

func (isc *ImageSizeConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ImageSizeConstraint) IsKind added in v0.17.0

func (isc *ImageSizeConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ImageSizeConstraint) PixelsHighRange added in v0.17.0

func (isc *ImageSizeConstraint) PixelsHighRange() foundation.NSRange

PixelsHighRange returns the pixels high range.

func (*ImageSizeConstraint) PixelsWideRange added in v0.17.0

func (isc *ImageSizeConstraint) PixelsWideRange() foundation.NSRange

PixelsWideRange returns the pixels wide range.

func (*ImageSizeConstraint) String added in v0.17.0

func (isc *ImageSizeConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ImageSizeConstraint) Type added in v0.17.0

Type returns the type.

type ImageSizeConstraintType added in v0.17.0

type ImageSizeConstraintType 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.
	ImageSizeConstraintTypeUnspecified ImageSizeConstraintType = 0
	// The image feature accepts image sizes listed in an array.
	ImageSizeConstraintTypeEnumerated ImageSizeConstraintType = 2
	// The image feature accepts image sizes defined by a range of widths and a range of heights.
	ImageSizeConstraintTypeRange ImageSizeConstraintType = 3
)

func (ImageSizeConstraintType) String added in v0.17.0

func (e ImageSizeConstraintType) String() string

String returns the ImageSizeConstraintType constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type Key added in v0.17.0

type Key struct {
	objref.Handle
}

Key is an idiomatic wrapper over the Objective-C class MLKey.

Key is an abstract base — you do not construct it directly. Construct one of MetricKey, ParameterKey and pass it where a Key is accepted.

An abstract base class for machine learning key types.

func KeyFromID added in v0.17.0

func KeyFromID(id objc.ID) *Key

KeyFromID adopts an existing Objective-C object as a Key (nil for 0), retaining it and registering a release finalizer.

func (*Key) Description added in v0.17.0

func (k *Key) Description() string

Description returns the object's -description text.

func (*Key) IsEqual added in v0.17.0

func (k *Key) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Key) IsKind added in v0.17.0

func (k *Key) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Key) Name added in v0.17.0

func (k *Key) Name() string

Name returns the name.

func (*Key) Scope added in v0.17.0

func (k *Key) Scope() string

Scope returns the scope.

func (*Key) String added in v0.17.0

func (k *Key) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type KeyProvider added in v0.17.0

type KeyProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

KeyProvider is accepted wherever a MLKey (or one of its subclasses) is expected.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

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

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MTLCommandBuffer

type MTLCommandBuffer interface {
}

MTLCommandBuffer is the Go form of the Objective-C protocol MTLCommandBuffer.

type MTLDevice

type MTLDevice interface {
}

MTLDevice is the Go form of the Objective-C protocol MTLDevice.

type MTLTexture

type MTLTexture interface {
}

MTLTexture is the Go form of the Objective-C protocol MTLTexture.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MetricKey added in v0.17.0

type MetricKey struct {
	Key
}

MetricKey is an idiomatic wrapper over the Objective-C class MLMetricKey.

It embeds Key, promoting that type's methods.

A key for the metrics dictionary in an update context.

func EpochIndex added in v0.17.0

func EpochIndex() *MetricKey

EpochIndex returns the epoch index.

func LossValue added in v0.17.0

func LossValue() *MetricKey

LossValue returns the loss value.

func MetricKeyFromID added in v0.17.0

func MetricKeyFromID(id objc.ID) *MetricKey

MetricKeyFromID adopts an existing Objective-C object as a MetricKey (nil for 0), retaining it and registering a release finalizer.

func MiniBatchIndex added in v0.17.0

func MiniBatchIndex() *MetricKey

MiniBatchIndex returns the mini batch index.

func NewMetricKey added in v0.17.0

func NewMetricKey() *MetricKey

NewMetricKey creates a new MetricKey.

type Model added in v0.17.0

type Model struct {
	objref.Handle
}

Model is an idiomatic wrapper over the Objective-C class MLModel.

An encapsulation of all the details of your machine learning model.

func MLModelLoadContentsOfURLConfiguration added in v0.17.0

func MLModelLoadContentsOfURLConfiguration(ctx context.Context, url string, configuration *ModelConfiguration) (result *Model, err error)

MLModelLoadContentsOfURLConfiguration creates a Core ML model instance asynchronously from a compiled model file, a custom configuration, and a completion handler.

MLModelLoadContentsOfURLConfiguration blocks until the operation completes or ctx is cancelled.

func MLModelLoadModelAssetConfiguration added in v0.17.0

func MLModelLoadModelAssetConfiguration(ctx context.Context, asset *ModelAsset, configuration *ModelConfiguration) (result *Model, err error)

MLModelLoadModelAssetConfiguration construct a model asynchronously from a compiled model asset.

MLModelLoadModelAssetConfiguration blocks until the operation completes or ctx is cancelled.

func ModelFromID added in v0.17.0

func ModelFromID(id objc.ID) *Model

ModelFromID adopts an existing Objective-C object as a Model (nil for 0), retaining it and registering a release finalizer.

func ModelWithContentsOfURL added in v0.17.0

func ModelWithContentsOfURL(url string) (result *Model, err error)

ModelWithContentsOfURL creates a Core ML model instance from a compiled model file.

func ModelWithContentsOfURLConfiguration added in v0.17.0

func ModelWithContentsOfURLConfiguration(url string, configuration *ModelConfiguration) (result *Model, err error)

ModelWithContentsOfURLConfiguration creates a Core ML model instance from a compiled model file and a custom configuration.

func NewModel added in v0.17.0

func NewModel() *Model

NewModel creates a new Model.

func (*Model) Configuration added in v0.17.0

func (m *Model) Configuration() *ModelConfiguration

Configuration returns the load-time parameters used to instantiate this MLModel object.

func (*Model) Description added in v0.17.0

func (m *Model) Description() string

Description returns the object's -description text.

func (*Model) IsEqual added in v0.17.0

func (m *Model) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Model) IsKind added in v0.17.0

func (m *Model) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Model) ModelDescription added in v0.17.0

func (m *Model) ModelDescription() *ModelDescription

ModelDescription returns a model holds a description of its required inputs and expected outputs.

func (*Model) NewState added in v0.17.0

func (m *Model) NewState() *State

NewState creates a new state object.

func (*Model) ParameterValueForKey added in v0.17.0

func (m *Model) ParameterValueForKey(key *ParameterKey) (result obj.Object, err error)

ParameterValueForKey returns a model parameter value for a key.

func (*Model) String added in v0.17.0

func (m *Model) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelAsset added in v0.17.0

type ModelAsset struct {
	objref.Handle
}

ModelAsset is an idiomatic wrapper over the Objective-C class MLModelAsset.

An abstraction of a compiled Core ML model asset.

func ModelAssetFromID added in v0.17.0

func ModelAssetFromID(id objc.ID) *ModelAsset

ModelAssetFromID adopts an existing Objective-C object as a ModelAsset (nil for 0), retaining it and registering a release finalizer.

func ModelAssetWithSpecificationData added in v0.17.0

func ModelAssetWithSpecificationData(specificationData []byte) (result *ModelAsset, err error)

ModelAssetWithSpecificationData creates a model asset from an in-memory model specification.

func ModelAssetWithSpecificationDataBlobMapping added in v0.17.0

func ModelAssetWithSpecificationDataBlobMapping(specificationData []byte, blobMapping obj.Object) (result *ModelAsset, err error)

ModelAssetWithSpecificationDataBlobMapping construct a model asset from an ML Program specification by replacing blob file references with corresponding in-memory blobs.

func ModelAssetWithURL added in v0.17.0

func ModelAssetWithURL(compiledModelURL string) (result *ModelAsset, err error)

ModelAssetWithURL constructs a ModelAsset from a compiled model URL.

func NewModelAsset added in v0.17.0

func NewModelAsset() *ModelAsset

NewModelAsset creates a new ModelAsset.

func (*ModelAsset) Description added in v0.17.0

func (ma *ModelAsset) Description() string

Description returns the object's -description text.

func (*ModelAsset) FunctionNames added in v0.17.0

func (ma *ModelAsset) FunctionNames(ctx context.Context) (result obj.Object, err error)

FunctionNames the list of function names in the model asset.

FunctionNames blocks until the operation completes or ctx is cancelled.

func (*ModelAsset) IsEqual added in v0.17.0

func (ma *ModelAsset) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelAsset) IsKind added in v0.17.0

func (ma *ModelAsset) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelAsset) ModelDescription added in v0.17.0

func (ma *ModelAsset) ModelDescription(ctx context.Context) (result *ModelDescription, err error)

ModelDescription the default model descripton.

ModelDescription blocks until the operation completes or ctx is cancelled.

func (*ModelAsset) ModelDescriptionOfFunctionNamed added in v0.17.0

func (ma *ModelAsset) ModelDescriptionOfFunctionNamed(ctx context.Context, functionName string) (result *ModelDescription, err error)

ModelDescriptionOfFunctionNamed the model descripton for a specified function.

ModelDescriptionOfFunctionNamed blocks until the operation completes or ctx is cancelled.

func (*ModelAsset) String added in v0.17.0

func (ma *ModelAsset) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelConfiguration added in v0.17.0

type ModelConfiguration struct {
	objref.Handle
}

ModelConfiguration is an idiomatic wrapper over the Objective-C class MLModelConfiguration.

The settings for creating or updating a machine learning model.

func ModelConfigurationFromID added in v0.17.0

func ModelConfigurationFromID(id objc.ID) *ModelConfiguration

ModelConfigurationFromID adopts an existing Objective-C object as a ModelConfiguration (nil for 0), retaining it and registering a release finalizer.

func NewModelConfiguration added in v0.17.0

func NewModelConfiguration() *ModelConfiguration

NewModelConfiguration creates a new ModelConfiguration.

func (*ModelConfiguration) AllowLowPrecisionAccumulationOnGPU added in v0.17.0

func (mc *ModelConfiguration) AllowLowPrecisionAccumulationOnGPU() bool

AllowLowPrecisionAccumulationOnGPU reports whether set to true to allow low precision accumulation on GPU when available. Defaults to false

func (*ModelConfiguration) ComputeUnits added in v0.17.0

func (mc *ModelConfiguration) ComputeUnits() ComputeUnits

ComputeUnits returns the compute units.

func (*ModelConfiguration) Description added in v0.17.0

func (mc *ModelConfiguration) Description() string

Description returns the object's -description text.

func (*ModelConfiguration) FunctionName added in v0.17.0

func (mc *ModelConfiguration) FunctionName() string

FunctionName returns the function name.

func (*ModelConfiguration) IsEqual added in v0.17.0

func (mc *ModelConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelConfiguration) IsKind added in v0.17.0

func (mc *ModelConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelConfiguration) ModelDisplayName added in v0.17.0

func (mc *ModelConfiguration) ModelDisplayName() string

ModelDisplayName returns 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 (*ModelConfiguration) OptimizationHints added in v0.17.0

func (mc *ModelConfiguration) OptimizationHints() *OptimizationHints

OptimizationHints returns a group of hints for CoreML to optimize

func (*ModelConfiguration) Parameters added in v0.17.0

func (mc *ModelConfiguration) Parameters() obj.Object

Parameters returns the parameters.

func (*ModelConfiguration) String added in v0.17.0

func (mc *ModelConfiguration) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ModelConfiguration) WithAllowLowPrecisionAccumulationOnGPU added in v0.17.0

func (mc *ModelConfiguration) WithAllowLowPrecisionAccumulationOnGPU(allowLowPrecisionAccumulationOnGPU bool) *ModelConfiguration

WithAllowLowPrecisionAccumulationOnGPU sets a Boolean value that determines whether to allow low-precision accumulation on a GPU.

func (*ModelConfiguration) WithComputeUnits added in v0.17.0

func (mc *ModelConfiguration) WithComputeUnits(computeUnits ComputeUnits) *ModelConfiguration

WithComputeUnits sets the processing unit or units the model uses to make predictions.

func (*ModelConfiguration) WithFunctionName added in v0.17.0

func (mc *ModelConfiguration) WithFunctionName(functionName string) *ModelConfiguration

WithFunctionName sets function name that MLModel will use.

func (*ModelConfiguration) WithModelDisplayName added in v0.17.0

func (mc *ModelConfiguration) WithModelDisplayName(modelDisplayName string) *ModelConfiguration

WithModelDisplayName sets a human readable name of a model for display purposes.

func (*ModelConfiguration) WithOptimizationHints added in v0.17.0

func (mc *ModelConfiguration) WithOptimizationHints(optimizationHints *OptimizationHints) *ModelConfiguration

WithOptimizationHints sets a group of hints for CoreML to optimize

func (*ModelConfiguration) WithParameters added in v0.17.0

func (mc *ModelConfiguration) WithParameters(parameters obj.Object) *ModelConfiguration

WithParameters sets a dictionary of configuration settings your app can override when loading a model.

type ModelDescription added in v0.17.0

type ModelDescription struct {
	objref.Handle
}

ModelDescription is an idiomatic wrapper over the Objective-C class MLModelDescription.

Information about a model, primarily the input and output format for each feature the model expects, and optional metadata.

func ModelDescriptionFromID added in v0.17.0

func ModelDescriptionFromID(id objc.ID) *ModelDescription

ModelDescriptionFromID adopts an existing Objective-C object as a ModelDescription (nil for 0), retaining it and registering a release finalizer.

func NewModelDescription added in v0.17.0

func NewModelDescription() *ModelDescription

NewModelDescription creates a new ModelDescription.

func (*ModelDescription) ClassLabels added in v0.17.0

func (md *ModelDescription) ClassLabels() []obj.Object

ClassLabels returns 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 (*ModelDescription) Description added in v0.17.0

func (md *ModelDescription) Description() string

Description returns the object's -description text.

func (*ModelDescription) InputDescriptionsByName added in v0.17.0

func (md *ModelDescription) InputDescriptionsByName() map[string]*FeatureDescription

InputDescriptionsByName returns description of the inputs to the model

func (*ModelDescription) IsEqual added in v0.17.0

func (md *ModelDescription) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelDescription) IsKind added in v0.17.0

func (md *ModelDescription) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelDescription) IsUpdatable added in v0.17.0

func (md *ModelDescription) IsUpdatable() bool

IsUpdatable reports whether the object is updatable.

func (*ModelDescription) Metadata added in v0.17.0

func (md *ModelDescription) Metadata() obj.Object

Metadata returns optional metadata describing the model

func (*ModelDescription) OutputDescriptionsByName added in v0.17.0

func (md *ModelDescription) OutputDescriptionsByName() map[string]*FeatureDescription

OutputDescriptionsByName returns description of the outputs from the model

func (*ModelDescription) ParameterDescriptionsByKey added in v0.17.0

func (md *ModelDescription) ParameterDescriptionsByKey() obj.Object

ParameterDescriptionsByKey returns the parameter descriptions by key.

func (*ModelDescription) PredictedFeatureName added in v0.17.0

func (md *ModelDescription) PredictedFeatureName() string

PredictedFeatureName returns name of the primary target / predicted output feature in the output descriptions

func (*ModelDescription) PredictedProbabilitiesName added in v0.17.0

func (md *ModelDescription) PredictedProbabilitiesName() string

PredictedProbabilitiesName returns key for all predicted probabilities stored as a MLFeatureTypeDictionary in the output descriptions

func (*ModelDescription) StateDescriptionsByName added in v0.17.0

func (md *ModelDescription) StateDescriptionsByName() map[string]*FeatureDescription

StateDescriptionsByName returns description of the state features.

func (*ModelDescription) String added in v0.17.0

func (md *ModelDescription) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ModelDescription) TrainingInputDescriptionsByName added in v0.17.0

func (md *ModelDescription) TrainingInputDescriptionsByName() map[string]*FeatureDescription

TrainingInputDescriptionsByName returns the training input descriptions by name.

type ModelError added in v0.17.0

type ModelError 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.
	ModelErrorGeneric ModelError = 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`.
	ModelErrorFeatureType ModelError = 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.
	ModelErrorIO ModelError = 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.
	ModelErrorCustomLayer ModelError = 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.
	ModelErrorCustomModel ModelError = 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.
	ModelErrorUpdate ModelError = 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.
	ModelErrorParameters ModelError = 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.
	ModelErrorModelDecryptionKeyFetch ModelError = 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.
	ModelErrorModelDecryption ModelError = 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.
	ModelErrorModelCollection ModelError = 10
	// Core ML throws/returns this error when the prediction is cancelled prior to completing.
	ModelErrorPredictionCancelled ModelError = 11
)

func (ModelError) String added in v0.17.0

func (e ModelError) String() string

String returns the ModelError constant's name, or its numeric form when the value is not a known constant.

type ModelStructure added in v0.17.0

type ModelStructure struct {
	objref.Handle
}

ModelStructure is an idiomatic wrapper over the Objective-C class MLModelStructure.

An enum representing the structure of a model.

func LoadContentsOfURL added in v0.17.0

func LoadContentsOfURL(ctx context.Context, url string) (result *ModelStructure, err error)

LoadContentsOfURL construct the model structure asynchronously given the location of its on-disk representation.

LoadContentsOfURL blocks until the operation completes or ctx is cancelled.

func LoadModelAsset added in v0.17.0

func LoadModelAsset(ctx context.Context, asset *ModelAsset) (result *ModelStructure, err error)

LoadModelAsset construct the model structure asynchronously given the model asset.

LoadModelAsset blocks until the operation completes or ctx is cancelled.

func ModelStructureFromID added in v0.17.0

func ModelStructureFromID(id objc.ID) *ModelStructure

ModelStructureFromID adopts an existing Objective-C object as a ModelStructure (nil for 0), retaining it and registering a release finalizer.

func NewModelStructure added in v0.17.0

func NewModelStructure() *ModelStructure

NewModelStructure creates a new ModelStructure.

func (*ModelStructure) Description added in v0.17.0

func (ms *ModelStructure) Description() string

Description returns the object's -description text.

func (*ModelStructure) IsEqual added in v0.17.0

func (ms *ModelStructure) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructure) IsKind added in v0.17.0

func (ms *ModelStructure) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructure) NeuralNetwork added in v0.17.0

func (ms *ModelStructure) NeuralNetwork() *ModelStructureNeuralNetwork

NeuralNetwork returns if the model is of NeuralNetwork type then it is the structure of the NeuralNetwork otherwise `nil`.

func (*ModelStructure) Pipeline added in v0.17.0

func (ms *ModelStructure) Pipeline() *ModelStructurePipeline

Pipeline returns if the model is of Pipeline type then it is the structure of the Pipeline otherwise `nil`.

func (*ModelStructure) Program added in v0.17.0

func (ms *ModelStructure) Program() *ModelStructureProgram

Program returns if the model is of ML Program type then it is the structure of the ML Program otherwise `nil`.

func (*ModelStructure) String added in v0.17.0

func (ms *ModelStructure) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureNeuralNetwork added in v0.17.0

type ModelStructureNeuralNetwork struct {
	objref.Handle
}

ModelStructureNeuralNetwork is an idiomatic wrapper over the Objective-C class MLModelStructureNeuralNetwork.

A class representing the structure of a NeuralNetwork model.

func ModelStructureNeuralNetworkFromID added in v0.17.0

func ModelStructureNeuralNetworkFromID(id objc.ID) *ModelStructureNeuralNetwork

ModelStructureNeuralNetworkFromID adopts an existing Objective-C object as a ModelStructureNeuralNetwork (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureNeuralNetwork added in v0.17.0

func NewModelStructureNeuralNetwork() *ModelStructureNeuralNetwork

NewModelStructureNeuralNetwork creates a new ModelStructureNeuralNetwork.

func (*ModelStructureNeuralNetwork) Description added in v0.17.0

func (msnn *ModelStructureNeuralNetwork) Description() string

Description returns the object's -description text.

func (*ModelStructureNeuralNetwork) IsEqual added in v0.17.0

func (msnn *ModelStructureNeuralNetwork) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureNeuralNetwork) IsKind added in v0.17.0

func (msnn *ModelStructureNeuralNetwork) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureNeuralNetwork) Layers added in v0.17.0

Layers returns the layers.

Layers returns the collection as a Go slice.

func (*ModelStructureNeuralNetwork) String added in v0.17.0

func (msnn *ModelStructureNeuralNetwork) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureNeuralNetworkLayer added in v0.17.0

type ModelStructureNeuralNetworkLayer struct {
	objref.Handle
}

ModelStructureNeuralNetworkLayer is an idiomatic wrapper over the Objective-C class MLModelStructureNeuralNetworkLayer.

A class representing a layer in a NeuralNetwork.

func ModelStructureNeuralNetworkLayerFromID added in v0.17.0

func ModelStructureNeuralNetworkLayerFromID(id objc.ID) *ModelStructureNeuralNetworkLayer

ModelStructureNeuralNetworkLayerFromID adopts an existing Objective-C object as a ModelStructureNeuralNetworkLayer (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureNeuralNetworkLayer added in v0.17.0

func NewModelStructureNeuralNetworkLayer() *ModelStructureNeuralNetworkLayer

NewModelStructureNeuralNetworkLayer creates a new ModelStructureNeuralNetworkLayer.

func (*ModelStructureNeuralNetworkLayer) Description added in v0.17.0

func (msnnl *ModelStructureNeuralNetworkLayer) Description() string

Description returns the object's -description text.

func (*ModelStructureNeuralNetworkLayer) InputNames added in v0.17.0

func (msnnl *ModelStructureNeuralNetworkLayer) InputNames() []string

InputNames returns the input names.

InputNames returns the collection as a Go slice.

func (*ModelStructureNeuralNetworkLayer) IsEqual added in v0.17.0

func (msnnl *ModelStructureNeuralNetworkLayer) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureNeuralNetworkLayer) IsKind added in v0.17.0

func (msnnl *ModelStructureNeuralNetworkLayer) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureNeuralNetworkLayer) Name added in v0.17.0

Name returns the layer name.

func (*ModelStructureNeuralNetworkLayer) OutputNames added in v0.17.0

func (msnnl *ModelStructureNeuralNetworkLayer) OutputNames() []string

OutputNames returns the output names.

OutputNames returns the collection as a Go slice.

func (*ModelStructureNeuralNetworkLayer) String added in v0.17.0

func (msnnl *ModelStructureNeuralNetworkLayer) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ModelStructureNeuralNetworkLayer) Type added in v0.17.0

Type returns the type of the layer, e,g, "elementwise", "pooling", etc.

type ModelStructurePipeline added in v0.17.0

type ModelStructurePipeline struct {
	objref.Handle
}

ModelStructurePipeline is an idiomatic wrapper over the Objective-C class MLModelStructurePipeline.

A class representing the structure of a Pipeline model.

func ModelStructurePipelineFromID added in v0.17.0

func ModelStructurePipelineFromID(id objc.ID) *ModelStructurePipeline

ModelStructurePipelineFromID adopts an existing Objective-C object as a ModelStructurePipeline (nil for 0), retaining it and registering a release finalizer.

func NewModelStructurePipeline added in v0.17.0

func NewModelStructurePipeline() *ModelStructurePipeline

NewModelStructurePipeline creates a new ModelStructurePipeline.

func (*ModelStructurePipeline) Description added in v0.17.0

func (msp *ModelStructurePipeline) Description() string

Description returns the object's -description text.

func (*ModelStructurePipeline) IsEqual added in v0.17.0

func (msp *ModelStructurePipeline) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructurePipeline) IsKind added in v0.17.0

func (msp *ModelStructurePipeline) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructurePipeline) String added in v0.17.0

func (msp *ModelStructurePipeline) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ModelStructurePipeline) SubModelNames added in v0.17.0

func (msp *ModelStructurePipeline) SubModelNames() []string

SubModelNames returns the names of the sub models in the pipeline.

SubModelNames returns the collection as a Go slice.

func (*ModelStructurePipeline) SubModels added in v0.17.0

func (msp *ModelStructurePipeline) SubModels() []*ModelStructure

SubModels returns the structure of the sub models in the pipeline.

SubModels returns the collection as a Go slice.

type ModelStructureProgram added in v0.17.0

type ModelStructureProgram struct {
	objref.Handle
}

ModelStructureProgram is an idiomatic wrapper over the Objective-C class MLModelStructureProgram.

A class representing the structure of an ML Program model.

func ModelStructureProgramFromID added in v0.17.0

func ModelStructureProgramFromID(id objc.ID) *ModelStructureProgram

ModelStructureProgramFromID adopts an existing Objective-C object as a ModelStructureProgram (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgram added in v0.17.0

func NewModelStructureProgram() *ModelStructureProgram

NewModelStructureProgram creates a new ModelStructureProgram.

func (*ModelStructureProgram) Description added in v0.17.0

func (msp *ModelStructureProgram) Description() string

Description returns the object's -description text.

func (*ModelStructureProgram) Functions added in v0.17.0

Functions returns the functions.

func (*ModelStructureProgram) IsEqual added in v0.17.0

func (msp *ModelStructureProgram) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgram) IsKind added in v0.17.0

func (msp *ModelStructureProgram) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgram) String added in v0.17.0

func (msp *ModelStructureProgram) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureProgramArgument added in v0.17.0

type ModelStructureProgramArgument struct {
	objref.Handle
}

ModelStructureProgramArgument is an idiomatic wrapper over the Objective-C class MLModelStructureProgramArgument.

A class representing an argument in the Program.

func ModelStructureProgramArgumentFromID added in v0.17.0

func ModelStructureProgramArgumentFromID(id objc.ID) *ModelStructureProgramArgument

ModelStructureProgramArgumentFromID adopts an existing Objective-C object as a ModelStructureProgramArgument (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramArgument added in v0.17.0

func NewModelStructureProgramArgument() *ModelStructureProgramArgument

NewModelStructureProgramArgument creates a new ModelStructureProgramArgument.

func (*ModelStructureProgramArgument) Bindings added in v0.17.0

Bindings returns the bindings.

Bindings returns the collection as a Go slice.

func (*ModelStructureProgramArgument) Description added in v0.17.0

func (mspa *ModelStructureProgramArgument) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramArgument) IsEqual added in v0.17.0

func (mspa *ModelStructureProgramArgument) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramArgument) IsKind added in v0.17.0

func (mspa *ModelStructureProgramArgument) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramArgument) String added in v0.17.0

func (mspa *ModelStructureProgramArgument) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureProgramBinding added in v0.17.0

type ModelStructureProgramBinding struct {
	objref.Handle
}

ModelStructureProgramBinding is an idiomatic wrapper over the Objective-C class MLModelStructureProgramBinding.

A class representing a binding in the Program

func ModelStructureProgramBindingFromID added in v0.17.0

func ModelStructureProgramBindingFromID(id objc.ID) *ModelStructureProgramBinding

ModelStructureProgramBindingFromID adopts an existing Objective-C object as a ModelStructureProgramBinding (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramBinding added in v0.17.0

func NewModelStructureProgramBinding() *ModelStructureProgramBinding

NewModelStructureProgramBinding creates a new ModelStructureProgramBinding.

func (*ModelStructureProgramBinding) Description added in v0.17.0

func (mspb *ModelStructureProgramBinding) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramBinding) IsEqual added in v0.17.0

func (mspb *ModelStructureProgramBinding) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramBinding) IsKind added in v0.17.0

func (mspb *ModelStructureProgramBinding) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramBinding) Name added in v0.17.0

func (mspb *ModelStructureProgramBinding) Name() string

Name returns the name of the variable in the Program.

func (*ModelStructureProgramBinding) String added in v0.17.0

func (mspb *ModelStructureProgramBinding) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ModelStructureProgramBinding) Value added in v0.17.0

Value returns the compile time constant value in the Program.

type ModelStructureProgramBlock added in v0.17.0

type ModelStructureProgramBlock struct {
	objref.Handle
}

ModelStructureProgramBlock is an idiomatic wrapper over the Objective-C class MLModelStructureProgramBlock.

A class representing a block in the Program.

func ModelStructureProgramBlockFromID added in v0.17.0

func ModelStructureProgramBlockFromID(id objc.ID) *ModelStructureProgramBlock

ModelStructureProgramBlockFromID adopts an existing Objective-C object as a ModelStructureProgramBlock (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramBlock added in v0.17.0

func NewModelStructureProgramBlock() *ModelStructureProgramBlock

NewModelStructureProgramBlock creates a new ModelStructureProgramBlock.

func (*ModelStructureProgramBlock) Description added in v0.17.0

func (mspb *ModelStructureProgramBlock) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramBlock) Inputs added in v0.17.0

Inputs returns the named inputs to the block.

Inputs returns the collection as a Go slice.

func (*ModelStructureProgramBlock) IsEqual added in v0.17.0

func (mspb *ModelStructureProgramBlock) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramBlock) IsKind added in v0.17.0

func (mspb *ModelStructureProgramBlock) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramBlock) Operations added in v0.17.0

Operations returns the list of topologically sorted operations in the block.

Operations returns the collection as a Go slice.

func (*ModelStructureProgramBlock) OutputNames added in v0.17.0

func (mspb *ModelStructureProgramBlock) OutputNames() []string

OutputNames returns the output names.

OutputNames returns the collection as a Go slice.

func (*ModelStructureProgramBlock) String added in v0.17.0

func (mspb *ModelStructureProgramBlock) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureProgramFunction added in v0.17.0

type ModelStructureProgramFunction struct {
	objref.Handle
}

ModelStructureProgramFunction is an idiomatic wrapper over the Objective-C class MLModelStructureProgramFunction.

A class representing a function in the Program.

func ModelStructureProgramFunctionFromID added in v0.17.0

func ModelStructureProgramFunctionFromID(id objc.ID) *ModelStructureProgramFunction

ModelStructureProgramFunctionFromID adopts an existing Objective-C object as a ModelStructureProgramFunction (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramFunction added in v0.17.0

func NewModelStructureProgramFunction() *ModelStructureProgramFunction

NewModelStructureProgramFunction creates a new ModelStructureProgramFunction.

func (*ModelStructureProgramFunction) Block added in v0.17.0

Block returns the active block in the function.

func (*ModelStructureProgramFunction) Description added in v0.17.0

func (mspf *ModelStructureProgramFunction) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramFunction) Inputs added in v0.17.0

Inputs returns the named inputs to the function.

Inputs returns the collection as a Go slice.

func (*ModelStructureProgramFunction) IsEqual added in v0.17.0

func (mspf *ModelStructureProgramFunction) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramFunction) IsKind added in v0.17.0

func (mspf *ModelStructureProgramFunction) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramFunction) String added in v0.17.0

func (mspf *ModelStructureProgramFunction) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureProgramNamedValueType added in v0.17.0

type ModelStructureProgramNamedValueType struct {
	objref.Handle
}

ModelStructureProgramNamedValueType is an idiomatic wrapper over the Objective-C class MLModelStructureProgramNamedValueType.

A class representing a named value type in a Program.

func ModelStructureProgramNamedValueTypeFromID added in v0.17.0

func ModelStructureProgramNamedValueTypeFromID(id objc.ID) *ModelStructureProgramNamedValueType

ModelStructureProgramNamedValueTypeFromID adopts an existing Objective-C object as a ModelStructureProgramNamedValueType (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramNamedValueType added in v0.17.0

func NewModelStructureProgramNamedValueType() *ModelStructureProgramNamedValueType

NewModelStructureProgramNamedValueType creates a new ModelStructureProgramNamedValueType.

func (*ModelStructureProgramNamedValueType) Description added in v0.17.0

func (mspnvt *ModelStructureProgramNamedValueType) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramNamedValueType) IsEqual added in v0.17.0

func (mspnvt *ModelStructureProgramNamedValueType) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramNamedValueType) IsKind added in v0.17.0

func (mspnvt *ModelStructureProgramNamedValueType) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramNamedValueType) Name added in v0.17.0

Name returns the name of the parameter.

func (*ModelStructureProgramNamedValueType) String added in v0.17.0

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ModelStructureProgramNamedValueType) Type added in v0.17.0

Type returns the type of the parameter.

type ModelStructureProgramOperation added in v0.17.0

type ModelStructureProgramOperation struct {
	objref.Handle
}

ModelStructureProgramOperation is an idiomatic wrapper over the Objective-C class MLModelStructureProgramOperation.

A class representing an Operation in a Program.

func ModelStructureProgramOperationFromID added in v0.17.0

func ModelStructureProgramOperationFromID(id objc.ID) *ModelStructureProgramOperation

ModelStructureProgramOperationFromID adopts an existing Objective-C object as a ModelStructureProgramOperation (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramOperation added in v0.17.0

func NewModelStructureProgramOperation() *ModelStructureProgramOperation

NewModelStructureProgramOperation creates a new ModelStructureProgramOperation.

func (*ModelStructureProgramOperation) Blocks added in v0.17.0

Blocks returns nested blocks for loops and conditionals, e.g., a conditional block will have two entries here.

Blocks returns the collection as a Go slice.

func (*ModelStructureProgramOperation) Description added in v0.17.0

func (mspo *ModelStructureProgramOperation) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramOperation) Inputs added in v0.17.0

Inputs returns the arguments to the Operation.

func (*ModelStructureProgramOperation) IsEqual added in v0.17.0

func (mspo *ModelStructureProgramOperation) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramOperation) IsKind added in v0.17.0

func (mspo *ModelStructureProgramOperation) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramOperation) OperatorName added in v0.17.0

func (mspo *ModelStructureProgramOperation) OperatorName() string

OperatorName returns the name of the operator, e.g., "conv", "pool", "softmax", etc.

func (*ModelStructureProgramOperation) Outputs added in v0.17.0

Outputs returns the outputs of the Operation.

Outputs returns the collection as a Go slice.

func (*ModelStructureProgramOperation) String added in v0.17.0

func (mspo *ModelStructureProgramOperation) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureProgramValue added in v0.17.0

type ModelStructureProgramValue struct {
	objref.Handle
}

ModelStructureProgramValue is an idiomatic wrapper over the Objective-C class MLModelStructureProgramValue.

A class representing a constant value in the Program.

func ModelStructureProgramValueFromID added in v0.17.0

func ModelStructureProgramValueFromID(id objc.ID) *ModelStructureProgramValue

ModelStructureProgramValueFromID adopts an existing Objective-C object as a ModelStructureProgramValue (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramValue added in v0.17.0

func NewModelStructureProgramValue() *ModelStructureProgramValue

NewModelStructureProgramValue creates a new ModelStructureProgramValue.

func (*ModelStructureProgramValue) Description added in v0.17.0

func (mspv *ModelStructureProgramValue) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramValue) IsEqual added in v0.17.0

func (mspv *ModelStructureProgramValue) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramValue) IsKind added in v0.17.0

func (mspv *ModelStructureProgramValue) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramValue) String added in v0.17.0

func (mspv *ModelStructureProgramValue) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ModelStructureProgramValueType added in v0.17.0

type ModelStructureProgramValueType struct {
	objref.Handle
}

ModelStructureProgramValueType is an idiomatic wrapper over the Objective-C class MLModelStructureProgramValueType.

A class representing the type of a value or a variable in the Program.

func ModelStructureProgramValueTypeFromID added in v0.17.0

func ModelStructureProgramValueTypeFromID(id objc.ID) *ModelStructureProgramValueType

ModelStructureProgramValueTypeFromID adopts an existing Objective-C object as a ModelStructureProgramValueType (nil for 0), retaining it and registering a release finalizer.

func NewModelStructureProgramValueType added in v0.17.0

func NewModelStructureProgramValueType() *ModelStructureProgramValueType

NewModelStructureProgramValueType creates a new ModelStructureProgramValueType.

func (*ModelStructureProgramValueType) Description added in v0.17.0

func (mspvt *ModelStructureProgramValueType) Description() string

Description returns the object's -description text.

func (*ModelStructureProgramValueType) IsEqual added in v0.17.0

func (mspvt *ModelStructureProgramValueType) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ModelStructureProgramValueType) IsKind added in v0.17.0

func (mspvt *ModelStructureProgramValueType) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ModelStructureProgramValueType) String added in v0.17.0

func (mspvt *ModelStructureProgramValueType) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type MultiArray added in v0.17.0

type MultiArray struct {
	objref.Handle
}

MultiArray is an idiomatic wrapper over the Objective-C class MLMultiArray.

A machine learning collection type that stores numeric values in an array with multiple dimensions.

func MultiArrayByConcatenatingMultiArraysAlongAxisDataType added in v0.17.0

func MultiArrayByConcatenatingMultiArraysAlongAxisDataType(multiArrays []*MultiArray, axis int, dataType MultiArrayDataType) *MultiArray

MultiArrayByConcatenatingMultiArraysAlongAxisDataType concatenate MLMultiArrays to form a new MLMultiArray.

func MultiArrayFromID added in v0.17.0

func MultiArrayFromID(id objc.ID) *MultiArray

MultiArrayFromID adopts an existing Objective-C object as a MultiArray (nil for 0), retaining it and registering a release finalizer.

func NewMultiArrayWithDataPointerShapeDataTypeStridesDeallocator added in v0.18.0

func NewMultiArrayWithDataPointerShapeDataTypeStridesDeallocator(dataPointer unsafe.Pointer, shape []*foundation.Number, dataType MultiArrayDataType, strides []*foundation.Number, deallocator func(unsafe.Pointer)) (result *MultiArray, err error)

NewMultiArrayWithDataPointerShapeDataTypeStridesDeallocator creates a multiarray from a data pointer.

func NewMultiArrayWithPixelBufferShape added in v0.17.0

func NewMultiArrayWithPixelBufferShape(pixelBuffer unsafe.Pointer, shape []*foundation.Number) *MultiArray

NewMultiArrayWithPixelBufferShape creates a multiarray sharing the surface of a pixel buffer.

func NewMultiArrayWithShapeDataType added in v0.17.0

func NewMultiArrayWithShapeDataType(shape []*foundation.Number, dataType MultiArrayDataType) (result *MultiArray, err error)

NewMultiArrayWithShapeDataType creates a multidimensional array with a shape and type.

func NewMultiArrayWithShapeDataTypeStrides added in v0.17.0

func NewMultiArrayWithShapeDataTypeStrides(shape []*foundation.Number, dataType MultiArrayDataType, strides []*foundation.Number) *MultiArray

NewMultiArrayWithShapeDataTypeStrides creates the object with specified strides.

func (*MultiArray) Count added in v0.17.0

func (ma *MultiArray) Count() int

Count returns count of total number of addressable scalars. The value is same as `product_d shape[d]`.

func (*MultiArray) DataPointer added in v0.18.0

func (ma *MultiArray) DataPointer() unsafe.Pointer

DataPointer returns unsafe pointer to underlying buffer holding the data

func (*MultiArray) DataType added in v0.17.0

func (ma *MultiArray) DataType() MultiArrayDataType

DataType returns scalar's data type.

func (*MultiArray) Description added in v0.17.0

func (ma *MultiArray) Description() string

Description returns the object's -description text.

func (*MultiArray) GetBytesWithHandler added in v0.18.0

func (ma *MultiArray) GetBytesWithHandler(handler func(unsafe.Pointer, int))

GetBytesWithHandler get the underlying buffer pointer to read.

func (*MultiArray) GetMutableBytesWithHandler added in v0.18.0

func (ma *MultiArray) GetMutableBytesWithHandler(handler func(unsafe.Pointer, int, obj.Object))

GetMutableBytesWithHandler get the underlying buffer pointer to mutate.

func (*MultiArray) IsEqual added in v0.17.0

func (ma *MultiArray) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MultiArray) IsKind added in v0.17.0

func (ma *MultiArray) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MultiArray) ObjectAtIndexedSubscript added in v0.17.0

func (ma *MultiArray) ObjectAtIndexedSubscript(idx int) *foundation.Number

ObjectAtIndexedSubscript get a value by its linear index (assumes C-style index ordering)

func (*MultiArray) ObjectForKeyedSubscript added in v0.17.0

func (ma *MultiArray) ObjectForKeyedSubscript(key []*foundation.Number) *foundation.Number

ObjectForKeyedSubscript get a value by its multidimensional index (NSArray<NSNumber *>)

func (*MultiArray) PixelBuffer added in v0.18.0

func (ma *MultiArray) PixelBuffer() unsafe.Pointer

PixelBuffer returns the backing pixel buffer if exists, otherwise nil.

func (*MultiArray) SetObjectAtIndexedSubscript added in v0.17.0

func (ma *MultiArray) SetObjectAtIndexedSubscript(object obj.Object, idx int)

SetObjectAtIndexedSubscript assigns a number to the multiarray’s element at the location that the linear offset defines.

func (*MultiArray) SetObjectForKeyedSubscript added in v0.17.0

func (ma *MultiArray) SetObjectForKeyedSubscript(object obj.Object, key []*foundation.Number)

SetObjectForKeyedSubscript assigns a number to the multiarray’s element at the location that the number array defines.

func (*MultiArray) Shape added in v0.17.0

func (ma *MultiArray) Shape() []obj.Object

Shape returns shape of the multi-dimensional space that this instance represents.

Shape returns the collection as a Go slice.

func (*MultiArray) Strides added in v0.17.0

func (ma *MultiArray) Strides() []obj.Object

Strides returns 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] ```

Strides returns the collection as a Go slice.

func (*MultiArray) String added in v0.17.0

func (ma *MultiArray) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*MultiArray) TransferToMultiArray added in v0.17.0

func (ma *MultiArray) TransferToMultiArray(destinationMultiArray *MultiArray)

TransferToMultiArray transfer the contents to the destination multi-array.

type MultiArrayConstraint added in v0.17.0

type MultiArrayConstraint struct {
	objref.Handle
}

MultiArrayConstraint is an idiomatic wrapper over the Objective-C class MLMultiArrayConstraint.

The shape and data type constraints for a multidimensional array feature.

func MultiArrayConstraintFromID added in v0.17.0

func MultiArrayConstraintFromID(id objc.ID) *MultiArrayConstraint

MultiArrayConstraintFromID adopts an existing Objective-C object as a MultiArrayConstraint (nil for 0), retaining it and registering a release finalizer.

func NewMultiArrayConstraint added in v0.17.0

func NewMultiArrayConstraint() *MultiArrayConstraint

NewMultiArrayConstraint creates a new MultiArrayConstraint.

func (*MultiArrayConstraint) DataType added in v0.17.0

func (mac *MultiArrayConstraint) DataType() MultiArrayDataType

DataType returns the data type.

func (*MultiArrayConstraint) Description added in v0.17.0

func (mac *MultiArrayConstraint) Description() string

Description returns the object's -description text.

func (*MultiArrayConstraint) IsEqual added in v0.17.0

func (mac *MultiArrayConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MultiArrayConstraint) IsKind added in v0.17.0

func (mac *MultiArrayConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MultiArrayConstraint) Shape added in v0.17.0

func (mac *MultiArrayConstraint) Shape() []obj.Object

Shape returns the shape.

Shape returns the collection as a Go slice.

func (*MultiArrayConstraint) ShapeConstraint added in v0.17.0

func (mac *MultiArrayConstraint) ShapeConstraint() *MultiArrayShapeConstraint

ShapeConstraint returns the shape constraint.

func (*MultiArrayConstraint) String added in v0.17.0

func (mac *MultiArrayConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MultiArrayDataType added in v0.17.0

type MultiArrayDataType int64

Constants that define the underlying element types a multiarray can store.

const (
	// Designates the multiarray’s elements as doubles.
	MultiArrayDataTypeDouble MultiArrayDataType = 65600
	// Designates the multiarray’s elements as 64-bit floats.
	MultiArrayDataTypeFloat64 MultiArrayDataType = 65600
	// Designates the multiarray’s elements as 32-bit floats.
	MultiArrayDataTypeFloat32 MultiArrayDataType = 65568
	// Designates the multiarray’s elements as 16-bit floats.
	MultiArrayDataTypeFloat16 MultiArrayDataType = 65552
	// Designates the multiarray’s elements as floats.
	MultiArrayDataTypeFloat MultiArrayDataType = 65568
	// Designates the multiarray’s elements as 32-bit integers.
	MultiArrayDataTypeInt32 MultiArrayDataType = 131104
	MultiArrayDataTypeInt8  MultiArrayDataType = 131080
)

func (MultiArrayDataType) String added in v0.17.0

func (e MultiArrayDataType) String() string

String returns the MultiArrayDataType constant's name, or its numeric form when the value is not a known constant.

type MultiArrayShapeConstraint added in v0.17.0

type MultiArrayShapeConstraint struct {
	objref.Handle
}

MultiArrayShapeConstraint is an idiomatic wrapper over the Objective-C class MLMultiArrayShapeConstraint.

The lists of shapes or ranges of shapes that constrain a multiarray feature.

func MultiArrayShapeConstraintFromID added in v0.17.0

func MultiArrayShapeConstraintFromID(id objc.ID) *MultiArrayShapeConstraint

MultiArrayShapeConstraintFromID adopts an existing Objective-C object as a MultiArrayShapeConstraint (nil for 0), retaining it and registering a release finalizer.

func NewMultiArrayShapeConstraint added in v0.17.0

func NewMultiArrayShapeConstraint() *MultiArrayShapeConstraint

NewMultiArrayShapeConstraint creates a new MultiArrayShapeConstraint.

func (*MultiArrayShapeConstraint) Description added in v0.17.0

func (masc *MultiArrayShapeConstraint) Description() string

Description returns the object's -description text.

func (*MultiArrayShapeConstraint) EnumeratedShapes added in v0.17.0

func (masc *MultiArrayShapeConstraint) EnumeratedShapes() []obj.Object

EnumeratedShapes returns the enumerated shapes.

EnumeratedShapes returns the collection as a Go slice.

func (*MultiArrayShapeConstraint) IsEqual added in v0.17.0

func (masc *MultiArrayShapeConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MultiArrayShapeConstraint) IsKind added in v0.17.0

func (masc *MultiArrayShapeConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MultiArrayShapeConstraint) SizeRangeForDimension added in v0.17.0

func (masc *MultiArrayShapeConstraint) SizeRangeForDimension() []obj.Object

SizeRangeForDimension returns the size range for dimension.

SizeRangeForDimension returns the collection as a Go slice.

func (*MultiArrayShapeConstraint) String added in v0.17.0

func (masc *MultiArrayShapeConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*MultiArrayShapeConstraint) Type added in v0.17.0

Type returns the type.

type MultiArrayShapeConstraintType added in v0.17.0

type MultiArrayShapeConstraintType int64

The possible types of shape constraints.

const (
	// The constraint type is undefined.
	MultiArrayShapeConstraintTypeUnspecified MultiArrayShapeConstraintType = 1
	// The constraint is an array of allowed shapes.
	MultiArrayShapeConstraintTypeEnumerated MultiArrayShapeConstraintType = 2
	// The constraint is a set of ranges allowed for the array shape.
	MultiArrayShapeConstraintTypeRange MultiArrayShapeConstraintType = 3
)

func (MultiArrayShapeConstraintType) String added in v0.17.0

String returns the MultiArrayShapeConstraintType constant's name, or its numeric form when the value is not a known constant.

type NXMouseButton

type NXMouseButton int32
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.

type NeuralEngineComputeDevice added in v0.17.0

type NeuralEngineComputeDevice struct {
	objref.Handle
}

NeuralEngineComputeDevice is an idiomatic wrapper over the Objective-C class MLNeuralEngineComputeDevice.

An object that represents a Neural Engine compute device.

func NeuralEngineComputeDeviceFromID added in v0.17.0

func NeuralEngineComputeDeviceFromID(id objc.ID) *NeuralEngineComputeDevice

NeuralEngineComputeDeviceFromID adopts an existing Objective-C object as a NeuralEngineComputeDevice (nil for 0), retaining it and registering a release finalizer.

func NewNeuralEngineComputeDevice added in v0.17.0

func NewNeuralEngineComputeDevice() *NeuralEngineComputeDevice

NewNeuralEngineComputeDevice creates a new NeuralEngineComputeDevice.

func (*NeuralEngineComputeDevice) Description added in v0.17.0

func (necd *NeuralEngineComputeDevice) Description() string

Description returns the object's -description text.

func (*NeuralEngineComputeDevice) IsEqual added in v0.17.0

func (necd *NeuralEngineComputeDevice) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*NeuralEngineComputeDevice) IsKind added in v0.17.0

func (necd *NeuralEngineComputeDevice) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*NeuralEngineComputeDevice) String added in v0.17.0

func (necd *NeuralEngineComputeDevice) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*NeuralEngineComputeDevice) TotalCoreCount added in v0.17.0

func (necd *NeuralEngineComputeDevice) TotalCoreCount() int

TotalCoreCount returns the total core count.

type NumericConstraint added in v0.17.0

type NumericConstraint struct {
	objref.Handle
}

NumericConstraint is an idiomatic wrapper over the Objective-C class MLNumericConstraint.

The value limitations of a number.

func NewNumericConstraint added in v0.17.0

func NewNumericConstraint() *NumericConstraint

NewNumericConstraint creates a new NumericConstraint.

func NumericConstraintFromID added in v0.17.0

func NumericConstraintFromID(id objc.ID) *NumericConstraint

NumericConstraintFromID adopts an existing Objective-C object as a NumericConstraint (nil for 0), retaining it and registering a release finalizer.

func (*NumericConstraint) Description added in v0.17.0

func (nc *NumericConstraint) Description() string

Description returns the object's -description text.

func (*NumericConstraint) EnumeratedNumbers added in v0.17.0

func (nc *NumericConstraint) EnumeratedNumbers() []*foundation.Number

EnumeratedNumbers returns the order of the returned elements is unspecified.

func (*NumericConstraint) IsEqual added in v0.17.0

func (nc *NumericConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*NumericConstraint) IsKind added in v0.17.0

func (nc *NumericConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*NumericConstraint) MaxNumber added in v0.17.0

func (nc *NumericConstraint) MaxNumber() *foundation.Number

MaxNumber returns the max number.

func (*NumericConstraint) MinNumber added in v0.17.0

func (nc *NumericConstraint) MinNumber() *foundation.Number

MinNumber returns the min number.

func (*NumericConstraint) String added in v0.17.0

func (nc *NumericConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type OptimizationHints added in v0.17.0

type OptimizationHints struct {
	objref.Handle
}

OptimizationHints is an idiomatic wrapper over the Objective-C class MLOptimizationHints.

func NewOptimizationHints added in v0.17.0

func NewOptimizationHints() *OptimizationHints

NewOptimizationHints creates a new OptimizationHints.

func OptimizationHintsFromID added in v0.17.0

func OptimizationHintsFromID(id objc.ID) *OptimizationHints

OptimizationHintsFromID adopts an existing Objective-C object as a OptimizationHints (nil for 0), retaining it and registering a release finalizer.

func (*OptimizationHints) Description added in v0.17.0

func (oh *OptimizationHints) Description() string

Description returns the object's -description text.

func (*OptimizationHints) IsEqual added in v0.17.0

func (oh *OptimizationHints) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*OptimizationHints) IsKind added in v0.17.0

func (oh *OptimizationHints) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*OptimizationHints) ReshapeFrequency added in v0.17.0

func (oh *OptimizationHints) ReshapeFrequency() ReshapeFrequencyHint

ReshapeFrequency returns 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 (*OptimizationHints) SpecializationStrategy added in v0.17.0

func (oh *OptimizationHints) SpecializationStrategy() SpecializationStrategy

SpecializationStrategy returns 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.

func (*OptimizationHints) String added in v0.17.0

func (oh *OptimizationHints) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*OptimizationHints) WithReshapeFrequency added in v0.17.0

func (oh *OptimizationHints) WithReshapeFrequency(reshapeFrequency ReshapeFrequencyHint) *OptimizationHints

WithReshapeFrequency sets 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 (*OptimizationHints) WithSpecializationStrategy added in v0.17.0

func (oh *OptimizationHints) WithSpecializationStrategy(specializationStrategy SpecializationStrategy) *OptimizationHints

WithSpecializationStrategy sets 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 PMPageToPaperMappingType

type PMPageToPaperMappingType int32
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.

type ParameterDescription added in v0.17.0

type ParameterDescription struct {
	objref.Handle
}

ParameterDescription is an idiomatic wrapper over the Objective-C class MLParameterDescription.

A description of a model parameter that includes a default value and a constraint, if applicable.

func NewParameterDescription added in v0.17.0

func NewParameterDescription() *ParameterDescription

NewParameterDescription creates a new ParameterDescription.

func ParameterDescriptionFromID added in v0.17.0

func ParameterDescriptionFromID(id objc.ID) *ParameterDescription

ParameterDescriptionFromID adopts an existing Objective-C object as a ParameterDescription (nil for 0), retaining it and registering a release finalizer.

func (*ParameterDescription) DefaultValue added in v0.17.0

func (pd *ParameterDescription) DefaultValue() obj.Object

DefaultValue returns the default value.

func (*ParameterDescription) Description added in v0.17.0

func (pd *ParameterDescription) Description() string

Description returns the object's -description text.

func (*ParameterDescription) IsEqual added in v0.17.0

func (pd *ParameterDescription) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ParameterDescription) IsKind added in v0.17.0

func (pd *ParameterDescription) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ParameterDescription) Key added in v0.17.0

Key returns the key.

func (*ParameterDescription) NumericConstraint added in v0.17.0

func (pd *ParameterDescription) NumericConstraint() *NumericConstraint

NumericConstraint returns the numeric constraint.

func (*ParameterDescription) String added in v0.17.0

func (pd *ParameterDescription) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ParameterKey added in v0.17.0

type ParameterKey struct {
	Key
}

ParameterKey is an idiomatic wrapper over the Objective-C class MLParameterKey.

It embeds Key, promoting that type's methods.

The keys for the parameter dictionary in a model configuration or a model update context.

func Beta1 added in v0.17.0

func Beta1() *ParameterKey

Beta1 returns the beta1.

func Beta2 added in v0.17.0

func Beta2() *ParameterKey

Beta2 returns the beta2.

func Biases added in v0.17.0

func Biases() *ParameterKey

Biases returns the biases.

func Epochs added in v0.17.0

func Epochs() *ParameterKey

Epochs returns the epochs.

func Eps added in v0.17.0

func Eps() *ParameterKey

Eps returns the eps.

func LearningRate added in v0.17.0

func LearningRate() *ParameterKey

LearningRate returns the learning rate.

func LinkedModelFileName added in v0.17.0

func LinkedModelFileName() *ParameterKey

LinkedModelFileName returns the linked model file name.

func LinkedModelSearchPath added in v0.17.0

func LinkedModelSearchPath() *ParameterKey

LinkedModelSearchPath returns the linked model search path.

func MiniBatchSize added in v0.17.0

func MiniBatchSize() *ParameterKey

MiniBatchSize returns the mini batch size.

func Momentum added in v0.17.0

func Momentum() *ParameterKey

Momentum returns the momentum.

func NewParameterKey added in v0.17.0

func NewParameterKey() *ParameterKey

NewParameterKey creates a new ParameterKey.

func NumberOfNeighbors added in v0.17.0

func NumberOfNeighbors() *ParameterKey

NumberOfNeighbors returns the number of neighbors.

func ParameterKeyFromID added in v0.17.0

func ParameterKeyFromID(id objc.ID) *ParameterKey

ParameterKeyFromID adopts an existing Objective-C object as a ParameterKey (nil for 0), retaining it and registering a release finalizer.

func Seed added in v0.17.0

func Seed() *ParameterKey

Seed returns the seed.

func Shuffle added in v0.17.0

func Shuffle() *ParameterKey

Shuffle returns the shuffle.

func Weights added in v0.17.0

func Weights() *ParameterKey

Weights returns the weights.

func (*ParameterKey) ScopedTo added in v0.17.0

func (pk *ParameterKey) ScopedTo(scope string) *ParameterKey

ScopedTo creates a copy of a parameter key and adds the scope to it.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PredictionOptions added in v0.17.0

type PredictionOptions struct {
	objref.Handle
}

PredictionOptions is an idiomatic wrapper over the Objective-C class MLPredictionOptions.

The options available when making a prediction.

func NewPredictionOptions added in v0.17.0

func NewPredictionOptions() *PredictionOptions

NewPredictionOptions creates a new PredictionOptions.

func PredictionOptionsFromID added in v0.17.0

func PredictionOptionsFromID(id objc.ID) *PredictionOptions

PredictionOptionsFromID adopts an existing Objective-C object as a PredictionOptions (nil for 0), retaining it and registering a release finalizer.

func (*PredictionOptions) Description added in v0.17.0

func (po *PredictionOptions) Description() string

Description returns the object's -description text.

func (*PredictionOptions) IsEqual added in v0.17.0

func (po *PredictionOptions) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PredictionOptions) IsKind added in v0.17.0

func (po *PredictionOptions) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PredictionOptions) OutputBackings added in v0.17.0

func (po *PredictionOptions) OutputBackings() map[string]obj.Object

OutputBackings returns propose the model to use the specified backing objects for the output feature values. 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:

func (*PredictionOptions) String added in v0.17.0

func (po *PredictionOptions) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*PredictionOptions) UsesCPUOnly added in v0.17.0

func (po *PredictionOptions) UsesCPUOnly() bool

UsesCPUOnly reports whether set to true to force computation to be on the CPU only

func (*PredictionOptions) WithOutputBackings added in v0.17.0

func (po *PredictionOptions) WithOutputBackings(outputBackings map[string]obj.Object) *PredictionOptions

WithOutputBackings sets a dictionary of feature names and client-allocated buffers.

func (*PredictionOptions) WithUsesCPUOnly added in v0.17.0

func (po *PredictionOptions) WithUsesCPUOnly(usesCPUOnly bool) *PredictionOptions

WithUsesCPUOnly sets a Boolean value that indicates whether a prediction is computed using only the CPU.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type ReshapeFrequencyHint added in v0.17.0

type ReshapeFrequencyHint 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.
	ReshapeFrequencyHintFrequent ReshapeFrequencyHint = 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.
	ReshapeFrequencyHintInfrequent ReshapeFrequencyHint = 1
)

func (ReshapeFrequencyHint) String added in v0.17.0

func (e ReshapeFrequencyHint) String() string

String returns the ReshapeFrequencyHint constant's name, or its numeric form when the value is not a known constant.

type Sequence added in v0.17.0

type Sequence struct {
	objref.Handle
}

Sequence is an idiomatic wrapper over the Objective-C class MLSequence.

A machine learning collection type that stores a series of strings or integers.

func EmptySequenceWithType added in v0.17.0

func EmptySequenceWithType(type_ FeatureType) *Sequence

EmptySequenceWithType creates an empty sequence of strings or integers.

func NewSequence added in v0.17.0

func NewSequence() *Sequence

NewSequence creates a new Sequence.

func SequenceFromID added in v0.17.0

func SequenceFromID(id objc.ID) *Sequence

SequenceFromID adopts an existing Objective-C object as a Sequence (nil for 0), retaining it and registering a release finalizer.

func SequenceWithInt64Array added in v0.17.0

func SequenceWithInt64Array(int64Values []*foundation.Number) *Sequence

SequenceWithInt64Array creates a sequence of integers from an array of numbers.

func SequenceWithStringArray added in v0.17.0

func SequenceWithStringArray(stringValues []string) *Sequence

SequenceWithStringArray creates a sequence of strings from a string array.

func (*Sequence) Description added in v0.17.0

func (s *Sequence) Description() string

Description returns the object's -description text.

func (*Sequence) Int64Values added in v0.17.0

func (s *Sequence) Int64Values() []obj.Object

Int64Values returns the int64 values.

Int64Values returns the collection as a Go slice.

func (*Sequence) IsEqual added in v0.17.0

func (s *Sequence) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Sequence) IsKind added in v0.17.0

func (s *Sequence) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Sequence) String added in v0.17.0

func (s *Sequence) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Sequence) StringValues added in v0.17.0

func (s *Sequence) StringValues() []string

StringValues returns the string values.

StringValues returns the collection as a Go slice.

func (*Sequence) Type added in v0.17.0

func (s *Sequence) Type() FeatureType

Type returns type of values held

type SequenceConstraint added in v0.17.0

type SequenceConstraint struct {
	objref.Handle
}

SequenceConstraint is an idiomatic wrapper over the Objective-C class MLSequenceConstraint.

The constraints for a sequence feature.

func NewSequenceConstraint added in v0.17.0

func NewSequenceConstraint() *SequenceConstraint

NewSequenceConstraint creates a new SequenceConstraint.

func SequenceConstraintFromID added in v0.17.0

func SequenceConstraintFromID(id objc.ID) *SequenceConstraint

SequenceConstraintFromID adopts an existing Objective-C object as a SequenceConstraint (nil for 0), retaining it and registering a release finalizer.

func (*SequenceConstraint) CountRange added in v0.17.0

func (sc *SequenceConstraint) CountRange() foundation.NSRange

CountRange returns the count range.

func (*SequenceConstraint) Description added in v0.17.0

func (sc *SequenceConstraint) Description() string

Description returns the object's -description text.

func (*SequenceConstraint) IsEqual added in v0.17.0

func (sc *SequenceConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SequenceConstraint) IsKind added in v0.17.0

func (sc *SequenceConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SequenceConstraint) String added in v0.17.0

func (sc *SequenceConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SequenceConstraint) ValueDescription added in v0.17.0

func (sc *SequenceConstraint) ValueDescription() *FeatureDescription

ValueDescription returns the value description.

type SpecializationStrategy added in v0.17.0

type SpecializationStrategy int64

The optimization strategy for the model specialization.

const (
	// The strategy that works well for most applications.
	SpecializationStrategyDefault SpecializationStrategy = 0
	// Prefer the prediction latency at the potential cost of specialization time, memory footprint, and the disk space usage of specialized artifacts.
	SpecializationStrategyFastPrediction SpecializationStrategy = 1
)

func (SpecializationStrategy) String added in v0.17.0

func (e SpecializationStrategy) String() string

String returns the SpecializationStrategy constant's name, or its numeric form when the value is not a known constant.

type State added in v0.17.0

type State struct {
	objref.Handle
}

State is an idiomatic wrapper over the Objective-C class MLState.

Handle to the state buffers.

func NewState added in v0.17.0

func NewState() *State

NewState creates a new State.

func StateFromID added in v0.17.0

func StateFromID(id objc.ID) *State

StateFromID adopts an existing Objective-C object as a State (nil for 0), retaining it and registering a release finalizer.

func (*State) Description added in v0.17.0

func (s *State) Description() string

Description returns the object's -description text.

func (*State) GetMultiArrayForStateNamedHandler added in v0.17.0

func (s *State) GetMultiArrayForStateNamedHandler(ctx context.Context, stateName string) (result *MultiArray, err error)

GetMultiArrayForStateNamedHandler gets a mutable view into a state buffer.

GetMultiArrayForStateNamedHandler blocks until the operation completes or ctx is cancelled.

func (*State) IsEqual added in v0.17.0

func (s *State) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*State) IsKind added in v0.17.0

func (s *State) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*State) String added in v0.17.0

func (s *State) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type StateConstraint added in v0.17.0

type StateConstraint struct {
	objref.Handle
}

StateConstraint is an idiomatic wrapper over the Objective-C class MLStateConstraint.

Constraint of a state feature value.

func NewStateConstraint added in v0.17.0

func NewStateConstraint() *StateConstraint

NewStateConstraint creates a new StateConstraint.

func StateConstraintFromID added in v0.17.0

func StateConstraintFromID(id objc.ID) *StateConstraint

StateConstraintFromID adopts an existing Objective-C object as a StateConstraint (nil for 0), retaining it and registering a release finalizer.

func (*StateConstraint) BufferShape added in v0.17.0

func (sc *StateConstraint) BufferShape() []obj.Object

BufferShape returns the shape of the state buffer.

BufferShape returns the collection as a Go slice.

func (*StateConstraint) DataType added in v0.17.0

func (sc *StateConstraint) DataType() MultiArrayDataType

DataType returns the data type of scalars in the state buffer.

func (*StateConstraint) Description added in v0.17.0

func (sc *StateConstraint) Description() string

Description returns the object's -description text.

func (*StateConstraint) IsEqual added in v0.17.0

func (sc *StateConstraint) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*StateConstraint) IsKind added in v0.17.0

func (sc *StateConstraint) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*StateConstraint) String added in v0.17.0

func (sc *StateConstraint) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Task added in v0.17.0

type Task struct {
	objref.Handle
}

Task is an idiomatic wrapper over the Objective-C class MLTask.

Task is an abstract base — you do not construct it directly. Construct one of UpdateTask and pass it where a Task is accepted.

An abstract base class for machine learning tasks.

func TaskFromID added in v0.17.0

func TaskFromID(id objc.ID) *Task

TaskFromID adopts an existing Objective-C object as a Task (nil for 0), retaining it and registering a release finalizer.

func (*Task) Cancel added in v0.17.0

func (t *Task) Cancel()

Cancel cancels a machine learning task before it completes.

func (*Task) Description added in v0.17.0

func (t *Task) Description() string

Description returns the object's -description text.

func (*Task) Error added in v0.18.0

func (t *Task) Error() unsafe.Pointer

Error returns the error.

func (*Task) IsEqual added in v0.17.0

func (t *Task) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Task) IsKind added in v0.17.0

func (t *Task) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Task) Resume added in v0.17.0

func (t *Task) Resume()

Resume begins or resumes a machine learning task.

func (*Task) State added in v0.17.0

func (t *Task) State() TaskState

State returns the state.

func (*Task) String added in v0.17.0

func (t *Task) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Task) TaskIdentifier added in v0.17.0

func (t *Task) TaskIdentifier() string

TaskIdentifier returns the task identifier.

type TaskProvider added in v0.17.0

type TaskProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TaskProvider is accepted wherever a MLTask (or one of its subclasses) is expected.

type TaskState added in v0.17.0

type TaskState int64

The state of a machine learning task.

const (
	// The state of a machine learning task that’s paused.
	TaskStateSuspended TaskState = 1
	// The state of a machine learning task that’s executing.
	TaskStateRunning TaskState = 2
	// The state of a machine learning task that’s in mid-termination, before it could finish successfully.
	TaskStateCancelling TaskState = 3
	// The state of a machine learning task that has finished successfully.
	TaskStateCompleted TaskState = 4
	// The state of a machine learning task that has terminated due to an error.
	TaskStateFailed TaskState = 5
)

func (TaskState) String added in v0.17.0

func (e TaskState) String() string

String returns the TaskState constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type UpdateContext added in v0.17.0

type UpdateContext struct {
	objref.Handle
}

UpdateContext is an idiomatic wrapper over the Objective-C class MLUpdateContext.

The context an update task provides to your app’s completion and update progress handlers.

func NewUpdateContext added in v0.17.0

func NewUpdateContext() *UpdateContext

NewUpdateContext creates a new UpdateContext.

func UpdateContextFromID added in v0.17.0

func UpdateContextFromID(id objc.ID) *UpdateContext

UpdateContextFromID adopts an existing Objective-C object as a UpdateContext (nil for 0), retaining it and registering a release finalizer.

func (*UpdateContext) Description added in v0.17.0

func (uc *UpdateContext) Description() string

Description returns the object's -description text.

func (*UpdateContext) Event added in v0.17.0

func (uc *UpdateContext) Event() UpdateProgressEvent

Event returns the event.

func (*UpdateContext) IsEqual added in v0.17.0

func (uc *UpdateContext) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*UpdateContext) IsKind added in v0.17.0

func (uc *UpdateContext) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*UpdateContext) Metrics added in v0.17.0

func (uc *UpdateContext) Metrics() obj.Object

Metrics returns the metrics.

func (*UpdateContext) Model added in v0.17.0

func (uc *UpdateContext) Model() *Model

Model returns the model.

func (*UpdateContext) Parameters added in v0.17.0

func (uc *UpdateContext) Parameters() obj.Object

Parameters returns the parameters.

func (*UpdateContext) String added in v0.17.0

func (uc *UpdateContext) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*UpdateContext) Task added in v0.17.0

func (uc *UpdateContext) Task() *UpdateTask

Task returns the task.

type UpdateProgressEvent added in v0.17.0

type UpdateProgressEvent int64

A type of event during a model update task. Bitmask — values may be combined with |.

const (
	// An event that represents the start of training.
	UpdateProgressEventTrainingBegin UpdateProgressEvent = 1
	// An event that represents the end of training epoch.
	UpdateProgressEventEpochEnd UpdateProgressEvent = 2
	// An event that represents the end of a mini-batch within a training epoch.
	UpdateProgressEventMiniBatchEnd UpdateProgressEvent = 4
)

func (UpdateProgressEvent) String added in v0.17.0

func (e UpdateProgressEvent) String() string

String returns the UpdateProgressEvent constant's name, or its numeric form when the value is not a known constant.

type UpdateProgressHandlers added in v0.17.0

type UpdateProgressHandlers struct {
	objref.Handle
}

UpdateProgressHandlers is an idiomatic wrapper over the Objective-C class MLUpdateProgressHandlers.

A collection of closures an update task uses to notify your app of its progress.

func NewUpdateProgressHandlersForEventsProgressHandlerCompletionHandler added in v0.17.0

func NewUpdateProgressHandlersForEventsProgressHandlerCompletionHandler(interestedEvents UpdateProgressEvent, progressHandler func(obj.Object), completionHandler func(obj.Object)) *UpdateProgressHandlers

NewUpdateProgressHandlersForEventsProgressHandlerCompletionHandler creates the collection of closures an update task uses to notify your app of its progress.

func UpdateProgressHandlersFromID added in v0.17.0

func UpdateProgressHandlersFromID(id objc.ID) *UpdateProgressHandlers

UpdateProgressHandlersFromID adopts an existing Objective-C object as a UpdateProgressHandlers (nil for 0), retaining it and registering a release finalizer.

func (*UpdateProgressHandlers) Description added in v0.17.0

func (uph *UpdateProgressHandlers) Description() string

Description returns the object's -description text.

func (*UpdateProgressHandlers) IsEqual added in v0.17.0

func (uph *UpdateProgressHandlers) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*UpdateProgressHandlers) IsKind added in v0.17.0

func (uph *UpdateProgressHandlers) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*UpdateProgressHandlers) String added in v0.17.0

func (uph *UpdateProgressHandlers) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type UpdateTask added in v0.17.0

type UpdateTask struct {
	Task
}

UpdateTask is an idiomatic wrapper over the Objective-C class MLUpdateTask.

It embeds Task, promoting that type's methods.

A task that updates a model with additional training data.

func NewUpdateTask added in v0.17.0

func NewUpdateTask() *UpdateTask

NewUpdateTask creates a new UpdateTask.

func UpdateTaskFromID added in v0.17.0

func UpdateTaskFromID(id objc.ID) *UpdateTask

UpdateTaskFromID adopts an existing Objective-C object as a UpdateTask (nil for 0), retaining it and registering a release finalizer.

func (*UpdateTask) ResumeWithParameters added in v0.17.0

func (ut *UpdateTask) ResumeWithParameters(updateParameters obj.Object)

ResumeWithParameters resumes a model update with updated parameter values.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type Writable added in v0.17.0

type Writable interface {
}

Writable is the Go form of the Objective-C protocol MLWritable.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL