coreml

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Integrate machine learning models into your app.

Apple Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArrayBatchProviderClass = _ArrayBatchProviderClass{objc.GetClass("MLArrayBatchProvider")}

The class instance for the ArrayBatchProvider class.

View Source
var DictionaryConstraintClass = _DictionaryConstraintClass{objc.GetClass("MLDictionaryConstraint")}

The class instance for the DictionaryConstraint class.

View Source
var DictionaryFeatureProviderClass = _DictionaryFeatureProviderClass{objc.GetClass("MLDictionaryFeatureProvider")}

The class instance for the DictionaryFeatureProvider class.

View Source
var FeatureDescriptionClass = _FeatureDescriptionClass{objc.GetClass("MLFeatureDescription")}

The class instance for the FeatureDescription class.

View Source
var FeatureValueClass = _FeatureValueClass{objc.GetClass("MLFeatureValue")}

The class instance for the FeatureValue class.

View Source
var ImageConstraintClass = _ImageConstraintClass{objc.GetClass("MLImageConstraint")}

The class instance for the ImageConstraint class.

View Source
var ImageSizeClass = _ImageSizeClass{objc.GetClass("MLImageSize")}

The class instance for the ImageSize class.

View Source
var ImageSizeConstraintClass = _ImageSizeConstraintClass{objc.GetClass("MLImageSizeConstraint")}

The class instance for the ImageSizeConstraint class.

View Source
var KeyClass = _KeyClass{objc.GetClass("MLKey")}

The class instance for the Key class.

View Source
var MetricKeyClass = _MetricKeyClass{objc.GetClass("MLMetricKey")}

The class instance for the MetricKey class.

View Source
var ModelClass = _ModelClass{objc.GetClass("MLModel")}

The class instance for the Model class.

View Source
var ModelCollectionClass = _ModelCollectionClass{objc.GetClass("MLModelCollection")}

The class instance for the ModelCollection class.

View Source
var ModelCollectionEntryClass = _ModelCollectionEntryClass{objc.GetClass("MLModelCollectionEntry")}

The class instance for the ModelCollectionEntry class.

View Source
var ModelConfigurationClass = _ModelConfigurationClass{objc.GetClass("MLModelConfiguration")}

The class instance for the ModelConfiguration class.

View Source
var ModelDescriptionClass = _ModelDescriptionClass{objc.GetClass("MLModelDescription")}

The class instance for the ModelDescription class.

View Source
var MultiArrayClass = _MultiArrayClass{objc.GetClass("MLMultiArray")}

The class instance for the MultiArray class.

View Source
var MultiArrayConstraintClass = _MultiArrayConstraintClass{objc.GetClass("MLMultiArrayConstraint")}

The class instance for the MultiArrayConstraint class.

View Source
var MultiArrayShapeConstraintClass = _MultiArrayShapeConstraintClass{objc.GetClass("MLMultiArrayShapeConstraint")}

The class instance for the MultiArrayShapeConstraint class.

View Source
var NumericConstraintClass = _NumericConstraintClass{objc.GetClass("MLNumericConstraint")}

The class instance for the NumericConstraint class.

View Source
var ParameterDescriptionClass = _ParameterDescriptionClass{objc.GetClass("MLParameterDescription")}

The class instance for the ParameterDescription class.

View Source
var ParameterKeyClass = _ParameterKeyClass{objc.GetClass("MLParameterKey")}

The class instance for the ParameterKey class.

View Source
var PredictionOptionsClass = _PredictionOptionsClass{objc.GetClass("MLPredictionOptions")}

The class instance for the PredictionOptions class.

View Source
var SequenceClass = _SequenceClass{objc.GetClass("MLSequence")}

The class instance for the Sequence class.

View Source
var SequenceConstraintClass = _SequenceConstraintClass{objc.GetClass("MLSequenceConstraint")}

The class instance for the SequenceConstraint class.

View Source
var TaskClass = _TaskClass{objc.GetClass("MLTask")}

The class instance for the Task class.

View Source
var UpdateContextClass = _UpdateContextClass{objc.GetClass("MLUpdateContext")}

The class instance for the UpdateContext class.

View Source
var UpdateProgressHandlersClass = _UpdateProgressHandlersClass{objc.GetClass("MLUpdateProgressHandlers")}

The class instance for the UpdateProgressHandlers class.

View Source
var UpdateTaskClass = _UpdateTaskClass{objc.GetClass("MLUpdateTask")}

The class instance for the UpdateTask class.

Functions

func Model_LoadContentsOfURLConfigurationCompletionHandler

func Model_LoadContentsOfURLConfigurationCompletionHandler(url foundation.IURL, configuration IModelConfiguration, handler func(model Model, error foundation.Error))

Creates a Core ML model instance asynchronously from a compiled model file, a custom configuration, and a completion handler. Full Topic

Types

type ArrayBatchProvider

type ArrayBatchProvider struct {
	objc.Object
}

A convenience wrapper for batches of feature providers. Full Topic

func ArrayBatchProviderFrom

func ArrayBatchProviderFrom(ptr unsafe.Pointer) ArrayBatchProvider

func NewArrayBatchProvider

func NewArrayBatchProvider() ArrayBatchProvider

func NewArrayBatchProviderWithDictionaryError

func NewArrayBatchProviderWithDictionaryError(dictionary map[string][]objc.IObject, error unsafe.Pointer) ArrayBatchProvider

Creates a batch provider based on feature names and their associated arrays of data. Full Topic

func NewArrayBatchProviderWithFeatureProviderArray

func NewArrayBatchProviderWithFeatureProviderArray(array []PFeatureProvider) ArrayBatchProvider

Creates the batch provider based on the array of feature providers. Full Topic

func (ArrayBatchProvider) Array

The array of feature providers. Full Topic

func (ArrayBatchProvider) Init

func (ArrayBatchProvider) InitWithDictionaryError

func (a_ ArrayBatchProvider) InitWithDictionaryError(dictionary map[string][]objc.IObject, error unsafe.Pointer) ArrayBatchProvider

func (ArrayBatchProvider) InitWithFeatureProviderArray

func (a_ ArrayBatchProvider) InitWithFeatureProviderArray(array []PFeatureProvider) ArrayBatchProvider

type BatchProviderObject

type BatchProviderObject struct {
	objc.Object
}

A concrete type for the PBatchProvider protocol.

func (BatchProviderObject) Count

func (b_ BatchProviderObject) Count() int

The number of feature providers in this batch. Full Topic

func (BatchProviderObject) FeaturesAtIndex

func (b_ BatchProviderObject) FeaturesAtIndex(index int) FeatureProviderObject

Returns the feature provider at the given index. Full Topic

func (BatchProviderObject) HasCount

func (b_ BatchProviderObject) HasCount() bool

func (BatchProviderObject) HasFeaturesAtIndex

func (b_ BatchProviderObject) HasFeaturesAtIndex() bool

type ComputeUnits

type ComputeUnits int

The set of processing-unit configurations the model can use to make predictions. Full Topic

const (
	ComputeUnitsAll       ComputeUnits = 2
	ComputeUnitsCPUAndGPU ComputeUnits = 1
	ComputeUnitsCPUOnly   ComputeUnits = 0
)

type CustomLayerObject

type CustomLayerObject struct {
	objc.Object
}

A concrete type for the PCustomLayer protocol.

func (CustomLayerObject) EncodeToCommandBufferInputsOutputsError

func (c_ CustomLayerObject) EncodeToCommandBufferInputsOutputsError(commandBuffer metal.CommandBufferObject, inputs []metal.TextureObject, outputs []metal.TextureObject, error unsafe.Pointer) bool

Encodes GPU commands to evaluate the custom layer. Full Topic

func (CustomLayerObject) EvaluateOnCPUWithInputsOutputsError

func (c_ CustomLayerObject) EvaluateOnCPUWithInputsOutputsError(inputs []MultiArray, outputs []MultiArray, error unsafe.Pointer) bool

Evaluates the custom layer with the given inputs. Full Topic

func (CustomLayerObject) HasEncodeToCommandBufferInputsOutputsError

func (c_ CustomLayerObject) HasEncodeToCommandBufferInputsOutputsError() bool

func (CustomLayerObject) HasEvaluateOnCPUWithInputsOutputsError

func (c_ CustomLayerObject) HasEvaluateOnCPUWithInputsOutputsError() bool

func (CustomLayerObject) HasInitWithParameterDictionaryError

func (c_ CustomLayerObject) HasInitWithParameterDictionaryError() bool

func (CustomLayerObject) HasOutputShapesForInputShapesError

func (c_ CustomLayerObject) HasOutputShapesForInputShapesError() bool

func (CustomLayerObject) HasSetWeightDataError

func (c_ CustomLayerObject) HasSetWeightDataError() bool

func (CustomLayerObject) InitWithParameterDictionaryError

func (c_ CustomLayerObject) InitWithParameterDictionaryError(parameters map[string]objc.Object, error unsafe.Pointer) objc.Object

Initializes the custom layer implementation. Full Topic

func (CustomLayerObject) OutputShapesForInputShapesError

func (c_ CustomLayerObject) OutputShapesForInputShapesError(inputShapes [][]foundation.Number, error unsafe.Pointer) [][]foundation.Number

Calculates the shapes of the output of this layer for the given input shapes. Full Topic

func (CustomLayerObject) SetWeightDataError

func (c_ CustomLayerObject) SetWeightDataError(weights [][]byte, error unsafe.Pointer) bool

Assigns the weights for the connections within the layer. Full Topic

type CustomModelObject

type CustomModelObject struct {
	objc.Object
}

A concrete type for the PCustomModel protocol.

func (CustomModelObject) HasInitWithModelDescriptionParameterDictionaryError

func (c_ CustomModelObject) HasInitWithModelDescriptionParameterDictionaryError() bool

func (CustomModelObject) HasPredictionFromFeaturesOptionsError

func (c_ CustomModelObject) HasPredictionFromFeaturesOptionsError() bool

func (CustomModelObject) HasPredictionsFromBatchOptionsError

func (c_ CustomModelObject) HasPredictionsFromBatchOptionsError() bool

func (CustomModelObject) InitWithModelDescriptionParameterDictionaryError

func (c_ CustomModelObject) InitWithModelDescriptionParameterDictionaryError(modelDescription ModelDescription, parameters map[string]objc.Object, error unsafe.Pointer) objc.Object

Creates a custom model with the given description and parameters. Full Topic

func (CustomModelObject) PredictionFromFeaturesOptionsError

func (c_ CustomModelObject) PredictionFromFeaturesOptionsError(input FeatureProviderObject, options PredictionOptions, error unsafe.Pointer) FeatureProviderObject

Predicts output values from the given input features. Full Topic

func (CustomModelObject) PredictionsFromBatchOptionsError

func (c_ CustomModelObject) PredictionsFromBatchOptionsError(inputBatch BatchProviderObject, options PredictionOptions, error unsafe.Pointer) BatchProviderObject

Predicts output values from the given batch of input features. Full Topic

type DictionaryConstraint

type DictionaryConstraint struct {
	objc.Object
}

The constraint on the keys for a dictionary feature. Full Topic

func DictionaryConstraintFrom

func DictionaryConstraintFrom(ptr unsafe.Pointer) DictionaryConstraint

func NewDictionaryConstraint

func NewDictionaryConstraint() DictionaryConstraint

func (DictionaryConstraint) Init

func (DictionaryConstraint) KeyType

func (d_ DictionaryConstraint) KeyType() FeatureType

The key type for the dictionary. Full Topic

type DictionaryFeatureProvider

type DictionaryFeatureProvider struct {
	objc.Object
}

A convenience wrapper for the given dictionary of data. Full Topic

func DictionaryFeatureProviderFrom

func DictionaryFeatureProviderFrom(ptr unsafe.Pointer) DictionaryFeatureProvider

func NewDictionaryFeatureProvider

func NewDictionaryFeatureProvider() DictionaryFeatureProvider

func NewDictionaryFeatureProviderWithDictionaryError

func NewDictionaryFeatureProviderWithDictionaryError(dictionary map[string]objc.IObject, error unsafe.Pointer) DictionaryFeatureProvider

Creates the feature provider based on a dictionary. Full Topic

func (DictionaryFeatureProvider) Dictionary

func (d_ DictionaryFeatureProvider) Dictionary() map[string]FeatureValue

The backing dictionary. Full Topic

func (DictionaryFeatureProvider) Init

func (DictionaryFeatureProvider) InitWithDictionaryError

func (d_ DictionaryFeatureProvider) InitWithDictionaryError(dictionary map[string]objc.IObject, error unsafe.Pointer) DictionaryFeatureProvider

func (DictionaryFeatureProvider) ObjectForKeyedSubscript

func (d_ DictionaryFeatureProvider) ObjectForKeyedSubscript(featureName string) FeatureValue

Subscript interface for the feature provider to pass through to the dictionary. Full Topic

type FeatureDescription

type FeatureDescription struct {
	objc.Object
}

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

func FeatureDescriptionFrom

func FeatureDescriptionFrom(ptr unsafe.Pointer) FeatureDescription

func NewFeatureDescription

func NewFeatureDescription() FeatureDescription

func (FeatureDescription) DictionaryConstraint

func (f_ FeatureDescription) DictionaryConstraint() DictionaryConstraint

The constraint for a dictionary feature. Full Topic

func (FeatureDescription) ImageConstraint

func (f_ FeatureDescription) ImageConstraint() ImageConstraint

The size and format constraints for an image feature. Full Topic

func (FeatureDescription) Init

func (FeatureDescription) IsAllowedValue

func (f_ FeatureDescription) IsAllowedValue(value IFeatureValue) bool

Checks whether the model will accept an input feature value. Full Topic

func (FeatureDescription) IsOptional

func (f_ FeatureDescription) IsOptional() bool

A Boolean value that indicates whether this feature is optional. Full Topic

func (FeatureDescription) MultiArrayConstraint

func (f_ FeatureDescription) MultiArrayConstraint() MultiArrayConstraint

The constraints on a multidimensional array feature. Full Topic

func (FeatureDescription) Name

func (f_ FeatureDescription) Name() string

The name of this feature. Full Topic

func (FeatureDescription) SequenceConstraint

func (f_ FeatureDescription) SequenceConstraint() SequenceConstraint

The constraints for a sequence feature. Full Topic

func (FeatureDescription) Type

func (f_ FeatureDescription) Type() FeatureType

The type of this feature. Full Topic

type FeatureProviderObject

type FeatureProviderObject struct {
	objc.Object
}

A concrete type for the PFeatureProvider protocol.

func (FeatureProviderObject) FeatureNames

func (f_ FeatureProviderObject) FeatureNames() foundation.Set

The set of valid feature names. Full Topic

func (FeatureProviderObject) FeatureValueForName

func (f_ FeatureProviderObject) FeatureValueForName(featureName string) FeatureValue

Accesses the feature value given the feature's name. Full Topic

func (FeatureProviderObject) HasFeatureNames

func (f_ FeatureProviderObject) HasFeatureNames() bool

func (FeatureProviderObject) HasFeatureValueForName

func (f_ FeatureProviderObject) HasFeatureValueForName() bool

type FeatureType

type FeatureType int

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

const (
	FeatureTypeDictionary FeatureType = 6
	FeatureTypeDouble     FeatureType = 2
	FeatureTypeImage      FeatureType = 4
	FeatureTypeInt64      FeatureType = 1
	FeatureTypeInvalid    FeatureType = 0
	FeatureTypeMultiArray FeatureType = 5
	FeatureTypeSequence   FeatureType = 7
	FeatureTypeString     FeatureType = 3
)

type FeatureValue

type FeatureValue struct {
	objc.Object
}

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

func FeatureValueFrom

func FeatureValueFrom(ptr unsafe.Pointer) FeatureValue

func FeatureValue_FeatureValueWithCGImageConstraintOptionsError

func FeatureValue_FeatureValueWithCGImageConstraintOptionsError(cgImage coregraphics.ImageRef, constraint IImageConstraint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by a core graphics image and a constraint. Full Topic

func FeatureValue_FeatureValueWithCGImageOrientationConstraintOptionsError

func FeatureValue_FeatureValueWithCGImageOrientationConstraintOptionsError(cgImage coregraphics.ImageRef, orientation imageio.ImagePropertyOrientation, constraint IImageConstraint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by a core graphics image, an orientation, and a constraint. Full Topic

func FeatureValue_FeatureValueWithCGImageOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError

func FeatureValue_FeatureValueWithCGImageOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError(cgImage coregraphics.ImageRef, orientation imageio.ImagePropertyOrientation, pixelsWide int, pixelsHigh int, pixelFormatType uint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by a core graphics image and its orientation, size, and pixel format. Full Topic

func FeatureValue_FeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptionsError

func FeatureValue_FeatureValueWithCGImagePixelsWidePixelsHighPixelFormatTypeOptionsError(cgImage coregraphics.ImageRef, pixelsWide int, pixelsHigh int, pixelFormatType uint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by a core graphics image and its size and pixel format. Full Topic

func FeatureValue_FeatureValueWithDictionaryError

func FeatureValue_FeatureValueWithDictionaryError(value foundation.Dictionary, error unsafe.Pointer) FeatureValue

Creates a feature value that contains a dictionary of numbers. Full Topic

func FeatureValue_FeatureValueWithDouble

func FeatureValue_FeatureValueWithDouble(value float64) FeatureValue

Creates a feature value that contains a double. Full Topic

func FeatureValue_FeatureValueWithImageAtURLConstraintOptionsError

func FeatureValue_FeatureValueWithImageAtURLConstraintOptionsError(url foundation.IURL, constraint IImageConstraint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by an image URL and a constraint. Full Topic

func FeatureValue_FeatureValueWithImageAtURLOrientationConstraintOptionsError

func FeatureValue_FeatureValueWithImageAtURLOrientationConstraintOptionsError(url foundation.IURL, orientation imageio.ImagePropertyOrientation, constraint IImageConstraint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by an image URL, an orientation, and a constraint. Full Topic

func FeatureValue_FeatureValueWithImageAtURLOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError

func FeatureValue_FeatureValueWithImageAtURLOrientationPixelsWidePixelsHighPixelFormatTypeOptionsError(url foundation.IURL, orientation imageio.ImagePropertyOrientation, pixelsWide int, pixelsHigh int, pixelFormatType uint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by an image URL and the image’s orientation, size, and pixel format. Full Topic

func FeatureValue_FeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptionsError

func FeatureValue_FeatureValueWithImageAtURLPixelsWidePixelsHighPixelFormatTypeOptionsError(url foundation.IURL, pixelsWide int, pixelsHigh int, pixelFormatType uint, options map[FeatureValueImageOption]objc.IObject, error unsafe.Pointer) FeatureValue

Creates a feature value that contains an image defined by an image URL and the image’s size and pixel format. Full Topic

func FeatureValue_FeatureValueWithInt64

func FeatureValue_FeatureValueWithInt64(value int64) FeatureValue

Creates a feature value that contains an integer. Full Topic

func FeatureValue_FeatureValueWithMultiArray

func FeatureValue_FeatureValueWithMultiArray(value IMultiArray) FeatureValue

Creates a feature value that contains a multidimensional array. Full Topic

func FeatureValue_FeatureValueWithPixelBuffer

func FeatureValue_FeatureValueWithPixelBuffer(value corevideo.PixelBufferRef) FeatureValue

Creates a feature value that contains an image from a pixel buffer. Full Topic

func FeatureValue_FeatureValueWithSequence

func FeatureValue_FeatureValueWithSequence(sequence ISequence) FeatureValue

Creates a feature value that contains a sequence. Full Topic

func FeatureValue_FeatureValueWithString

func FeatureValue_FeatureValueWithString(value string) FeatureValue

Creates a feature value that contains a string. Full Topic

func FeatureValue_UndefinedFeatureValueWithType

func FeatureValue_UndefinedFeatureValueWithType(type_ FeatureType) FeatureValue

Creates a feature value with a type that represents an undefined or missing value. Full Topic

func NewFeatureValue

func NewFeatureValue() FeatureValue

func (FeatureValue) DictionaryValue

func (f_ FeatureValue) DictionaryValue() foundation.Dictionary

The underlying dictionary of the feature value. Full Topic

func (FeatureValue) DoubleValue

func (f_ FeatureValue) DoubleValue() float64

The underlying double of the feature value. Full Topic

func (FeatureValue) ImageBufferValue

func (f_ FeatureValue) ImageBufferValue() corevideo.PixelBufferRef

The underlying image of the feature value as a pixel buffer. Full Topic

func (FeatureValue) Init

func (f_ FeatureValue) Init() FeatureValue

func (FeatureValue) Int64Value

func (f_ FeatureValue) Int64Value() int64

The underlying integer of the feature value. Full Topic

func (FeatureValue) IsEqualToFeatureValue

func (f_ FeatureValue) IsEqualToFeatureValue(value IFeatureValue) bool

Returns a Boolean value that indicates whether a feature value is equal to another. Full Topic

func (FeatureValue) IsUndefined

func (f_ FeatureValue) IsUndefined() bool

A Boolean value that indicates whether the feature value is undefined or missing. Full Topic

func (FeatureValue) MultiArrayValue

func (f_ FeatureValue) MultiArrayValue() MultiArray

The underlying multiarray of the feature value. Full Topic

func (FeatureValue) SequenceValue

func (f_ FeatureValue) SequenceValue() Sequence

The underlying sequence of the feature value. Full Topic

func (FeatureValue) StringValue

func (f_ FeatureValue) StringValue() string

The underlying string of the feature value. Full Topic

func (FeatureValue) Type

func (f_ FeatureValue) Type() FeatureType

The type of the feature value. Full Topic

type FeatureValueImageOption

type FeatureValueImageOption string

The initializer options you use to crop and scale an image when creating an image feature value. Full Topic

const (
	FeatureValueImageOptionCropAndScale FeatureValueImageOption = "MLFeatureValueImageOptionCropAndScale"
	FeatureValueImageOptionCropRect     FeatureValueImageOption = "MLFeatureValueImageOptionCropRect"
)

type IArrayBatchProvider

type IArrayBatchProvider interface {
	objc.IObject
	Array() []FeatureProviderObject
}

An interface definition for the ArrayBatchProvider class.

type IDictionaryConstraint

type IDictionaryConstraint interface {
	objc.IObject
	KeyType() FeatureType
}

An interface definition for the DictionaryConstraint class.

type IDictionaryFeatureProvider

type IDictionaryFeatureProvider interface {
	objc.IObject
	ObjectForKeyedSubscript(featureName string) FeatureValue
	Dictionary() map[string]FeatureValue
}

An interface definition for the DictionaryFeatureProvider class.

type IFeatureDescription

type IFeatureDescription interface {
	objc.IObject
	IsAllowedValue(value IFeatureValue) bool
	ImageConstraint() ImageConstraint
	Name() string
	Type() FeatureType
	IsOptional() bool
	MultiArrayConstraint() MultiArrayConstraint
	SequenceConstraint() SequenceConstraint
	DictionaryConstraint() DictionaryConstraint
}

An interface definition for the FeatureDescription class.

type IFeatureValue

type IFeatureValue interface {
	objc.IObject
	IsEqualToFeatureValue(value IFeatureValue) bool
	ImageBufferValue() corevideo.PixelBufferRef
	MultiArrayValue() MultiArray
	Type() FeatureType
	Int64Value() int64
	IsUndefined() bool
	StringValue() string
	SequenceValue() Sequence
	DictionaryValue() foundation.Dictionary
	DoubleValue() float64
}

An interface definition for the FeatureValue class.

type IImageConstraint

type IImageConstraint interface {
	objc.IObject
	PixelsWide() int
	PixelFormatType() uint
	PixelsHigh() int
	SizeConstraint() ImageSizeConstraint
}

An interface definition for the ImageConstraint class.

type IImageSize

type IImageSize interface {
	objc.IObject
	PixelsWide() int
	PixelsHigh() int
}

An interface definition for the ImageSize class.

type IImageSizeConstraint

type IImageSizeConstraint interface {
	objc.IObject
	Type() ImageSizeConstraintType
	EnumeratedImageSizes() []ImageSize
	PixelsWideRange() foundation.Range
	PixelsHighRange() foundation.Range
}

An interface definition for the ImageSizeConstraint class.

type IKey

type IKey interface {
	objc.IObject
	Name() string
	Scope() string
}

An interface definition for the Key class.

type IMetricKey

type IMetricKey interface {
	IKey
}

An interface definition for the MetricKey class.

type IModel

type IModel interface {
	objc.IObject
	PredictionsFromBatchError(inputBatch PBatchProvider, error unsafe.Pointer) BatchProviderObject
	PredictionsFromBatchObjectError(inputBatchObject objc.IObject, error unsafe.Pointer) BatchProviderObject
	PredictionFromFeaturesOptionsError(input PFeatureProvider, options IPredictionOptions, error unsafe.Pointer) FeatureProviderObject
	PredictionFromFeaturesObjectOptionsError(inputObject objc.IObject, options IPredictionOptions, error unsafe.Pointer) FeatureProviderObject
	PredictionFromFeaturesError(input PFeatureProvider, error unsafe.Pointer) FeatureProviderObject
	PredictionFromFeaturesObjectError(inputObject objc.IObject, error unsafe.Pointer) FeatureProviderObject
	PredictionsFromBatchOptionsError(inputBatch PBatchProvider, options IPredictionOptions, error unsafe.Pointer) BatchProviderObject
	PredictionsFromBatchObjectOptionsError(inputBatchObject objc.IObject, options IPredictionOptions, error unsafe.Pointer) BatchProviderObject
	ParameterValueForKeyError(key IParameterKey, error unsafe.Pointer) objc.Object
	ModelDescription() ModelDescription
	Configuration() ModelConfiguration
}

An interface definition for the Model class.

type IModelCollection

type IModelCollection interface {
	objc.IObject
}

An interface definition for the ModelCollection class.

type IModelCollectionEntry

type IModelCollectionEntry interface {
	objc.IObject
}

An interface definition for the ModelCollectionEntry class.

type IModelConfiguration

type IModelConfiguration interface {
	objc.IObject
	PreferredMetalDevice() metal.DeviceObject
	SetPreferredMetalDevice(value metal.PDevice)
	SetPreferredMetalDeviceObject(valueObject objc.IObject)
	Parameters() foundation.Dictionary
	SetParameters(value foundation.Dictionary)
	AllowLowPrecisionAccumulationOnGPU() bool
	SetAllowLowPrecisionAccumulationOnGPU(value bool)
	ComputeUnits() ComputeUnits
	SetComputeUnits(value ComputeUnits)
}

An interface definition for the ModelConfiguration class.

type IModelDescription

type IModelDescription interface {
	objc.IObject
	InputDescriptionsByName() map[string]FeatureDescription
	OutputDescriptionsByName() map[string]FeatureDescription
	TrainingInputDescriptionsByName() map[string]FeatureDescription
	IsUpdatable() bool
	ParameterDescriptionsByKey() foundation.Dictionary
	PredictedFeatureName() string
	PredictedProbabilitiesName() string
	Metadata() map[ModelMetadataKey]objc.Object
	ClassLabels() []objc.Object
}

An interface definition for the ModelDescription class.

type IMultiArray

type IMultiArray interface {
	objc.IObject
	SetObjectForKeyedSubscript(obj foundation.INumber, key []foundation.INumber)
	SetObjectAtIndexedSubscript(obj foundation.INumber, idx int)
	ObjectAtIndexedSubscript(idx int) foundation.Number
	ObjectForKeyedSubscript(key []foundation.INumber) foundation.Number
	Strides() []foundation.Number
	PixelBuffer() corevideo.PixelBufferRef
	Shape() []foundation.Number
	DataType() MultiArrayDataType
	Count() int
}

An interface definition for the MultiArray class.

type IMultiArrayConstraint

type IMultiArrayConstraint interface {
	objc.IObject
	DataType() MultiArrayDataType
	ShapeConstraint() MultiArrayShapeConstraint
	Shape() []foundation.Number
}

An interface definition for the MultiArrayConstraint class.

type IMultiArrayShapeConstraint

type IMultiArrayShapeConstraint interface {
	objc.IObject
	Type() MultiArrayShapeConstraintType
	EnumeratedShapes() [][]foundation.Number
	SizeRangeForDimension() []foundation.Value
}

An interface definition for the MultiArrayShapeConstraint class.

type INumericConstraint

type INumericConstraint interface {
	objc.IObject
	MinNumber() foundation.Number
	EnumeratedNumbers() foundation.Set
	MaxNumber() foundation.Number
}

An interface definition for the NumericConstraint class.

type IParameterDescription

type IParameterDescription interface {
	objc.IObject
	NumericConstraint() NumericConstraint
	DefaultValue() objc.Object
	Key() ParameterKey
}

An interface definition for the ParameterDescription class.

type IParameterKey

type IParameterKey interface {
	IKey
	ScopedTo(scope string) ParameterKey
}

An interface definition for the ParameterKey class.

type IPredictionOptions

type IPredictionOptions interface {
	objc.IObject
	OutputBackings() map[string]objc.Object
	SetOutputBackings(value map[string]objc.IObject)
}

An interface definition for the PredictionOptions class.

type ISequence

type ISequence interface {
	objc.IObject
	StringValues() []string
	Type() FeatureType
	Int64Values() []foundation.Number
}

An interface definition for the Sequence class.

type ISequenceConstraint

type ISequenceConstraint interface {
	objc.IObject
	CountRange() foundation.Range
	ValueDescription() FeatureDescription
}

An interface definition for the SequenceConstraint class.

type ITask

type ITask interface {
	objc.IObject
	Cancel()
	Resume()
	Error() foundation.Error
	State() TaskState
	TaskIdentifier() string
}

An interface definition for the Task class.

type IUpdateContext

type IUpdateContext interface {
	objc.IObject
	Parameters() foundation.Dictionary
	Metrics() foundation.Dictionary
	Model() Model
	Task() UpdateTask
	Event() UpdateProgressEvent
}

An interface definition for the UpdateContext class.

type IUpdateProgressHandlers

type IUpdateProgressHandlers interface {
	objc.IObject
}

An interface definition for the UpdateProgressHandlers class.

type IUpdateTask

type IUpdateTask interface {
	ITask
	ResumeWithParameters(updateParameters foundation.Dictionary)
}

An interface definition for the UpdateTask class.

type ImageConstraint

type ImageConstraint struct {
	objc.Object
}

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

func ImageConstraintFrom

func ImageConstraintFrom(ptr unsafe.Pointer) ImageConstraint

func NewImageConstraint

func NewImageConstraint() ImageConstraint

func (ImageConstraint) Init

func (i_ ImageConstraint) Init() ImageConstraint

func (ImageConstraint) PixelFormatType

func (i_ ImageConstraint) PixelFormatType() uint

The model's pixel format for an image feature. Full Topic

func (ImageConstraint) PixelsHigh

func (i_ ImageConstraint) PixelsHigh() int

The model's default height for an image feature. Full Topic

func (ImageConstraint) PixelsWide

func (i_ ImageConstraint) PixelsWide() int

The model's default width for an image feature. Full Topic

func (ImageConstraint) SizeConstraint

func (i_ ImageConstraint) SizeConstraint() ImageSizeConstraint

Additional sizes this image feature supports. Full Topic

type ImageSize

type ImageSize struct {
	objc.Object
}

The width and height of an image feature size. Full Topic

func ImageSizeFrom

func ImageSizeFrom(ptr unsafe.Pointer) ImageSize

func NewImageSize

func NewImageSize() ImageSize

func (ImageSize) Init

func (i_ ImageSize) Init() ImageSize

func (ImageSize) PixelsHigh

func (i_ ImageSize) PixelsHigh() int

The height of an image feature in pixels. Full Topic

func (ImageSize) PixelsWide

func (i_ ImageSize) PixelsWide() int

The width of an image feature in pixels. Full Topic

type ImageSizeConstraint

type ImageSizeConstraint struct {
	objc.Object
}

A list or range of sizes that augment an image constraint's default size. Full Topic

func ImageSizeConstraintFrom

func ImageSizeConstraintFrom(ptr unsafe.Pointer) ImageSizeConstraint

func NewImageSizeConstraint

func NewImageSizeConstraint() ImageSizeConstraint

func (ImageSizeConstraint) EnumeratedImageSizes

func (i_ ImageSizeConstraint) EnumeratedImageSizes() []ImageSize

An array of image sizes a model's image feature accepts as input or produces as output. Full Topic

func (ImageSizeConstraint) Init

func (ImageSizeConstraint) PixelsHighRange

func (i_ ImageSizeConstraint) PixelsHighRange() foundation.Range

The range of heights a model's image feature accepts as input or produces as output. Full Topic

func (ImageSizeConstraint) PixelsWideRange

func (i_ ImageSizeConstraint) PixelsWideRange() foundation.Range

The range of widths a model's image feature accepts as input or produces as output. Full Topic

func (ImageSizeConstraint) Type

Indicator of which properties to inspect for this image size constraint. Full Topic

type ImageSizeConstraintType

type ImageSizeConstraintType int

The modes that determine how the model defines a feature's image size constraint. Full Topic

const (
	ImageSizeConstraintTypeEnumerated  ImageSizeConstraintType = 2
	ImageSizeConstraintTypeRange       ImageSizeConstraintType = 3
	ImageSizeConstraintTypeUnspecified ImageSizeConstraintType = 0
)

type Key

type Key struct {
	objc.Object
}

An abstract base class for machine learning key types. Full Topic

func KeyFrom

func KeyFrom(ptr unsafe.Pointer) Key

func NewKey

func NewKey() Key

func (Key) Init

func (k_ Key) Init() Key

func (Key) Name

func (k_ Key) Name() string

The name of the machine learning key. Full Topic

func (Key) Scope

func (k_ Key) Scope() string

The applicable scope of the machine learning key. Full Topic

type MetricKey

type MetricKey struct {
	Key
}

A key for the metrics dictionary in an update context. Full Topic

func MetricKeyFrom

func MetricKeyFrom(ptr unsafe.Pointer) MetricKey

func MetricKey_EpochIndex

func MetricKey_EpochIndex() MetricKey

The key you use to access the epoch index (an Int64 value). Full Topic

func MetricKey_LossValue

func MetricKey_LossValue() MetricKey

The key you use to access the current loss (a float value). Full Topic

func MetricKey_MiniBatchIndex

func MetricKey_MiniBatchIndex() MetricKey

The key you use to access the mini-batch index (an Int64 value) within an epoch. Full Topic

func NewMetricKey

func NewMetricKey() MetricKey

func (MetricKey) Init

func (m_ MetricKey) Init() MetricKey

type Model

type Model struct {
	objc.Object
}

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

func ModelFrom

func ModelFrom(ptr unsafe.Pointer) Model

func Model_ModelWithContentsOfURLConfigurationError

func Model_ModelWithContentsOfURLConfigurationError(url foundation.IURL, configuration IModelConfiguration, error unsafe.Pointer) Model

Creates a Core ML model instance from a compiled model file and a custom configuration. Full Topic

func Model_ModelWithContentsOfURLError

func Model_ModelWithContentsOfURLError(url foundation.IURL, error unsafe.Pointer) Model

Creates a Core ML model instance from a compiled model file. Full Topic

func NewModel

func NewModel() Model

func (Model) Configuration

func (m_ Model) Configuration() ModelConfiguration

The configuration of the model set during initialization. Full Topic

func (Model) Init

func (m_ Model) Init() Model

func (Model) ModelDescription

func (m_ Model) ModelDescription() ModelDescription

Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view. Full Topic

func (Model) ParameterValueForKeyError

func (m_ Model) ParameterValueForKeyError(key IParameterKey, error unsafe.Pointer) objc.Object

Returns a model parameter value for a key. Full Topic

func (Model) PredictionFromFeaturesError

func (m_ Model) PredictionFromFeaturesError(input PFeatureProvider, error unsafe.Pointer) FeatureProviderObject

Generates a prediction from the feature values within the input feature provider. Full Topic

func (Model) PredictionFromFeaturesObjectError

func (m_ Model) PredictionFromFeaturesObjectError(inputObject objc.IObject, error unsafe.Pointer) FeatureProviderObject

Generates a prediction from the feature values within the input feature provider. Full Topic

func (Model) PredictionFromFeaturesObjectOptionsError

func (m_ Model) PredictionFromFeaturesObjectOptionsError(inputObject objc.IObject, options IPredictionOptions, error unsafe.Pointer) FeatureProviderObject

Generates a prediction from the feature values within the input feature provider using the prediction options. Full Topic

func (Model) PredictionFromFeaturesOptionsError

func (m_ Model) PredictionFromFeaturesOptionsError(input PFeatureProvider, options IPredictionOptions, error unsafe.Pointer) FeatureProviderObject

Generates a prediction from the feature values within the input feature provider using the prediction options. Full Topic

func (Model) PredictionsFromBatchError

func (m_ Model) PredictionsFromBatchError(inputBatch PBatchProvider, error unsafe.Pointer) BatchProviderObject

Generates predictions for each input feature provider within the batch provider. Full Topic

func (Model) PredictionsFromBatchObjectError

func (m_ Model) PredictionsFromBatchObjectError(inputBatchObject objc.IObject, error unsafe.Pointer) BatchProviderObject

Generates predictions for each input feature provider within the batch provider. Full Topic

func (Model) PredictionsFromBatchObjectOptionsError

func (m_ Model) PredictionsFromBatchObjectOptionsError(inputBatchObject objc.IObject, options IPredictionOptions, error unsafe.Pointer) BatchProviderObject

Generates a prediction for each input feature provider within the batch provider using the prediction options. Full Topic

func (Model) PredictionsFromBatchOptionsError

func (m_ Model) PredictionsFromBatchOptionsError(inputBatch PBatchProvider, options IPredictionOptions, error unsafe.Pointer) BatchProviderObject

Generates a prediction for each input feature provider within the batch provider using the prediction options. Full Topic

type ModelCollection

type ModelCollection struct {
	objc.Object
}

A set of Core ML models from a model deployment. Full Topic

func ModelCollectionFrom

func ModelCollectionFrom(ptr unsafe.Pointer) ModelCollection

func NewModelCollection

func NewModelCollection() ModelCollection

func (ModelCollection) Init

func (m_ ModelCollection) Init() ModelCollection

type ModelCollectionEntry

type ModelCollectionEntry struct {
	objc.Object
}

A model and its identifier within a model collection. Full Topic

func ModelCollectionEntryFrom

func ModelCollectionEntryFrom(ptr unsafe.Pointer) ModelCollectionEntry

func NewModelCollectionEntry

func NewModelCollectionEntry() ModelCollectionEntry

func (ModelCollectionEntry) Init

type ModelConfiguration

type ModelConfiguration struct {
	objc.Object
}

The settings for creating or updating a machine learning model. Full Topic

func ModelConfigurationFrom

func ModelConfigurationFrom(ptr unsafe.Pointer) ModelConfiguration

func NewModelConfiguration

func NewModelConfiguration() ModelConfiguration

func (ModelConfiguration) AllowLowPrecisionAccumulationOnGPU

func (m_ ModelConfiguration) AllowLowPrecisionAccumulationOnGPU() bool

A Boolean value that determines whether to allow low-precision accumulation on a GPU. Full Topic

func (ModelConfiguration) ComputeUnits

func (m_ ModelConfiguration) ComputeUnits() ComputeUnits

The processing unit or units the model uses to make predictions. Full Topic

func (ModelConfiguration) Init

func (ModelConfiguration) Parameters

func (m_ ModelConfiguration) Parameters() foundation.Dictionary

A dictionary of configuration settings your app can override when loading a model. Full Topic

func (ModelConfiguration) PreferredMetalDevice

func (m_ ModelConfiguration) PreferredMetalDevice() metal.DeviceObject

The metal device you prefer this model use to make predictions (inference) and update the model. Full Topic

func (ModelConfiguration) SetAllowLowPrecisionAccumulationOnGPU

func (m_ ModelConfiguration) SetAllowLowPrecisionAccumulationOnGPU(value bool)

A Boolean value that determines whether to allow low-precision accumulation on a GPU. Full Topic

func (ModelConfiguration) SetComputeUnits

func (m_ ModelConfiguration) SetComputeUnits(value ComputeUnits)

The processing unit or units the model uses to make predictions. Full Topic

func (ModelConfiguration) SetParameters

func (m_ ModelConfiguration) SetParameters(value foundation.Dictionary)

A dictionary of configuration settings your app can override when loading a model. Full Topic

func (ModelConfiguration) SetPreferredMetalDevice

func (m_ ModelConfiguration) SetPreferredMetalDevice(value metal.PDevice)

The metal device you prefer this model use to make predictions (inference) and update the model. Full Topic

func (ModelConfiguration) SetPreferredMetalDeviceObject

func (m_ ModelConfiguration) SetPreferredMetalDeviceObject(valueObject objc.IObject)

The metal device you prefer this model use to make predictions (inference) and update the model. Full Topic

type ModelDescription

type ModelDescription struct {
	objc.Object
}

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

func ModelDescriptionFrom

func ModelDescriptionFrom(ptr unsafe.Pointer) ModelDescription

func NewModelDescription

func NewModelDescription() ModelDescription

func (ModelDescription) ClassLabels

func (m_ ModelDescription) ClassLabels() []objc.Object

An array of labels, which can be either strings or a numbers, for classifier models. Full Topic

func (ModelDescription) Init

func (ModelDescription) InputDescriptionsByName

func (m_ ModelDescription) InputDescriptionsByName() map[string]FeatureDescription

A dictionary of input feature descriptions, which the model keys by the input’s name. Full Topic

func (ModelDescription) IsUpdatable

func (m_ ModelDescription) IsUpdatable() bool

A Boolean value that indicates whether you can update the model with additional training. Full Topic

func (ModelDescription) Metadata

func (m_ ModelDescription) Metadata() map[ModelMetadataKey]objc.Object

A dictionary of the model’s creation information, such as its description, author, version, and license. Full Topic

func (ModelDescription) OutputDescriptionsByName

func (m_ ModelDescription) OutputDescriptionsByName() map[string]FeatureDescription

A dictionary of output feature descriptions, which the model keys by the output’s name. Full Topic

func (ModelDescription) ParameterDescriptionsByKey

func (m_ ModelDescription) ParameterDescriptionsByKey() foundation.Dictionary

A dictionary of the descriptions for the model’s parameters. Full Topic

func (ModelDescription) PredictedFeatureName

func (m_ ModelDescription) PredictedFeatureName() string

The name of the primary prediction feature output description. Full Topic

func (ModelDescription) PredictedProbabilitiesName

func (m_ ModelDescription) PredictedProbabilitiesName() string

The name of the feature output description for all probabilities of a prediction. Full Topic

func (ModelDescription) TrainingInputDescriptionsByName

func (m_ ModelDescription) TrainingInputDescriptionsByName() map[string]FeatureDescription

A dictionary of the training input feature descriptions, which the model keys by the input’s name. Full Topic

type ModelError

type ModelError int

The categories of model-specific errors. Full Topic

const (
	ModelErrorCustomLayer             ModelError = 4
	ModelErrorCustomModel             ModelError = 5
	ModelErrorFeatureType             ModelError = 1
	ModelErrorGeneric                 ModelError = 0
	ModelErrorIO                      ModelError = 3
	ModelErrorModelCollection         ModelError = 10
	ModelErrorModelDecryption         ModelError = 9
	ModelErrorModelDecryptionKeyFetch ModelError = 8
	ModelErrorParameters              ModelError = 7
	ModelErrorUpdate                  ModelError = 6
)

type ModelMetadataKey

type ModelMetadataKey string

The set of keys the model uses to store values in its metadata dictionary. Full Topic

const (
	ModelAuthorKey         ModelMetadataKey = "MLModelAuthorKey"
	ModelCreatorDefinedKey ModelMetadataKey = "MLModelCreatorDefinedKey"
	ModelDescriptionKey    ModelMetadataKey = "MLModelDescriptionKey"
	ModelLicenseKey        ModelMetadataKey = "MLModelLicenseKey"
	ModelVersionStringKey  ModelMetadataKey = "MLModelVersionStringKey"
)

type MultiArray

type MultiArray struct {
	objc.Object
}

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

func MultiArrayFrom

func MultiArrayFrom(ptr unsafe.Pointer) MultiArray

func MultiArray_MultiArrayByConcatenatingMultiArraysAlongAxisDataType

func MultiArray_MultiArrayByConcatenatingMultiArraysAlongAxisDataType(multiArrays []IMultiArray, axis int, dataType MultiArrayDataType) MultiArray

Merges an array of multiarrays into one multiarray along an axis. Full Topic

func NewMultiArray

func NewMultiArray() MultiArray

func NewMultiArrayWithDataPointerShapeDataTypeStridesDeallocatorError

func NewMultiArrayWithDataPointerShapeDataTypeStridesDeallocatorError(dataPointer unsafe.Pointer, shape []foundation.INumber, dataType MultiArrayDataType, strides []foundation.INumber, deallocator func(bytes unsafe.Pointer), error unsafe.Pointer) MultiArray

Creates a multiarray from a data pointer. Full Topic

func NewMultiArrayWithPixelBufferShape

func NewMultiArrayWithPixelBufferShape(pixelBuffer corevideo.PixelBufferRef, shape []foundation.INumber) MultiArray

Creates a multiarray sharing the surface of a pixel buffer. Full Topic

func NewMultiArrayWithShapeDataTypeError

func NewMultiArrayWithShapeDataTypeError(shape []foundation.INumber, dataType MultiArrayDataType, error unsafe.Pointer) MultiArray

Creates a multidimensional array with a shape and type. Full Topic

func (MultiArray) Count

func (m_ MultiArray) Count() int

The total number of elements in the multiarray. Full Topic

func (MultiArray) DataType

func (m_ MultiArray) DataType() MultiArrayDataType

The underlying type of the multiarray. Full Topic

func (MultiArray) Init

func (m_ MultiArray) Init() MultiArray

func (MultiArray) InitWithDataPointerShapeDataTypeStridesDeallocatorError

func (m_ MultiArray) InitWithDataPointerShapeDataTypeStridesDeallocatorError(dataPointer unsafe.Pointer, shape []foundation.INumber, dataType MultiArrayDataType, strides []foundation.INumber, deallocator func(bytes unsafe.Pointer), error unsafe.Pointer) MultiArray

func (MultiArray) InitWithPixelBufferShape

func (m_ MultiArray) InitWithPixelBufferShape(pixelBuffer corevideo.PixelBufferRef, shape []foundation.INumber) MultiArray

func (MultiArray) InitWithShapeDataTypeError

func (m_ MultiArray) InitWithShapeDataTypeError(shape []foundation.INumber, dataType MultiArrayDataType, error unsafe.Pointer) MultiArray

func (MultiArray) ObjectAtIndexedSubscript

func (m_ MultiArray) ObjectAtIndexedSubscript(idx int) foundation.Number

Accesses the multiarray by using a linear offset. Full Topic

func (MultiArray) ObjectForKeyedSubscript

func (m_ MultiArray) ObjectForKeyedSubscript(key []foundation.INumber) foundation.Number

Accesses the multiarray by using a number array that has an element for each dimension. Full Topic

func (MultiArray) PixelBuffer

func (m_ MultiArray) PixelBuffer() corevideo.PixelBufferRef

A reference to the multiarray’s underlying pixel buffer. Full Topic

func (MultiArray) SetObjectAtIndexedSubscript

func (m_ MultiArray) SetObjectAtIndexedSubscript(obj foundation.INumber, idx int)

Assigns a number to the multiarray’s element at the location that the linear offset defines. Full Topic

func (MultiArray) SetObjectForKeyedSubscript

func (m_ MultiArray) SetObjectForKeyedSubscript(obj foundation.INumber, key []foundation.INumber)

Assigns a number to the multiarray’s element at the location that the number array defines. Full Topic

func (MultiArray) Shape

func (m_ MultiArray) Shape() []foundation.Number

The multiarray’s multidimensional shape as a number array in which each element’s value is the size of the corresponding dimension. Full Topic

func (MultiArray) Strides

func (m_ MultiArray) Strides() []foundation.Number

A number array in which each element is the number of memory locations that span the length of the corresponding dimension. Full Topic

type MultiArrayConstraint

type MultiArrayConstraint struct {
	objc.Object
}

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

func MultiArrayConstraintFrom

func MultiArrayConstraintFrom(ptr unsafe.Pointer) MultiArrayConstraint

func NewMultiArrayConstraint

func NewMultiArrayConstraint() MultiArrayConstraint

func (MultiArrayConstraint) DataType

The type for the multi array. Full Topic

func (MultiArrayConstraint) Init

func (MultiArrayConstraint) Shape

func (m_ MultiArrayConstraint) Shape() []foundation.Number

The shape of the multi array. Full Topic

func (MultiArrayConstraint) ShapeConstraint

func (m_ MultiArrayConstraint) ShapeConstraint() MultiArrayShapeConstraint

The constraint on the shape of the multiarray. Full Topic

type MultiArrayDataType

type MultiArrayDataType int

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

const (
	MultiArrayDataTypeDouble  MultiArrayDataType = 65600
	MultiArrayDataTypeFloat   MultiArrayDataType = 65568
	MultiArrayDataTypeFloat16 MultiArrayDataType = 65552
	MultiArrayDataTypeFloat32 MultiArrayDataType = 65568
	MultiArrayDataTypeFloat64 MultiArrayDataType = 65600
	MultiArrayDataTypeInt32   MultiArrayDataType = 131104
)

type MultiArrayShapeConstraint

type MultiArrayShapeConstraint struct {
	objc.Object
}

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

func MultiArrayShapeConstraintFrom

func MultiArrayShapeConstraintFrom(ptr unsafe.Pointer) MultiArrayShapeConstraint

func NewMultiArrayShapeConstraint

func NewMultiArrayShapeConstraint() MultiArrayShapeConstraint

func (MultiArrayShapeConstraint) EnumeratedShapes

func (m_ MultiArrayShapeConstraint) EnumeratedShapes() [][]foundation.Number

Array of allowed shapes for a multiarray feature. Full Topic

func (MultiArrayShapeConstraint) Init

func (MultiArrayShapeConstraint) SizeRangeForDimension

func (m_ MultiArrayShapeConstraint) SizeRangeForDimension() []foundation.Value

The allowable range for a dimention of the multiarray. Full Topic

func (MultiArrayShapeConstraint) Type

The type of the shape constraint. Full Topic

type MultiArrayShapeConstraintType

type MultiArrayShapeConstraintType int

The possible types of shape constraints. Full Topic

const (
	MultiArrayShapeConstraintTypeEnumerated  MultiArrayShapeConstraintType = 2
	MultiArrayShapeConstraintTypeRange       MultiArrayShapeConstraintType = 3
	MultiArrayShapeConstraintTypeUnspecified MultiArrayShapeConstraintType = 1
)

type NumericConstraint

type NumericConstraint struct {
	objc.Object
}

The value limitations of a number. Full Topic

func NewNumericConstraint

func NewNumericConstraint() NumericConstraint

func NumericConstraintFrom

func NumericConstraintFrom(ptr unsafe.Pointer) NumericConstraint

func (NumericConstraint) EnumeratedNumbers

func (n_ NumericConstraint) EnumeratedNumbers() foundation.Set

A set of the numbers allowed in this constraint. Full Topic

func (NumericConstraint) Init

func (NumericConstraint) MaxNumber

func (n_ NumericConstraint) MaxNumber() foundation.Number

The largest numerical value allowed by this constraint. Full Topic

func (NumericConstraint) MinNumber

func (n_ NumericConstraint) MinNumber() foundation.Number

The smallest numerical value allowed by this constraint. Full Topic

type PBatchProvider

type PBatchProvider interface {
	// optional
	FeaturesAtIndex(index int) FeatureProviderObject
	HasFeaturesAtIndex() bool

	// optional
	Count() int
	HasCount() bool
}

An interface that represents a collection of feature providers. Full Topic

type PCustomLayer

type PCustomLayer interface {
	// optional
	EvaluateOnCPUWithInputsOutputsError(inputs []MultiArray, outputs []MultiArray, error unsafe.Pointer) bool
	HasEvaluateOnCPUWithInputsOutputsError() bool

	// optional
	OutputShapesForInputShapesError(inputShapes [][]foundation.Number, error unsafe.Pointer) [][]foundation.Number
	HasOutputShapesForInputShapesError() bool

	// optional
	InitWithParameterDictionaryError(parameters map[string]objc.Object, error unsafe.Pointer) objc.Object
	HasInitWithParameterDictionaryError() bool

	// optional
	EncodeToCommandBufferInputsOutputsError(commandBuffer metal.CommandBufferObject, inputs []metal.TextureObject, outputs []metal.TextureObject, error unsafe.Pointer) bool
	HasEncodeToCommandBufferInputsOutputsError() bool

	// optional
	SetWeightDataError(weights [][]byte, error unsafe.Pointer) bool
	HasSetWeightDataError() bool
}

An interface that defines the behavior of a custom layer in your neural network model. Full Topic

type PCustomModel

type PCustomModel interface {
	// optional
	PredictionsFromBatchOptionsError(inputBatch BatchProviderObject, options PredictionOptions, error unsafe.Pointer) BatchProviderObject
	HasPredictionsFromBatchOptionsError() bool

	// optional
	PredictionFromFeaturesOptionsError(input FeatureProviderObject, options PredictionOptions, error unsafe.Pointer) FeatureProviderObject
	HasPredictionFromFeaturesOptionsError() bool

	// optional
	InitWithModelDescriptionParameterDictionaryError(modelDescription ModelDescription, parameters map[string]objc.Object, error unsafe.Pointer) objc.Object
	HasInitWithModelDescriptionParameterDictionaryError() bool
}

An interface that defines the behavior of a custom model. Full Topic

type PFeatureProvider

type PFeatureProvider interface {
	// optional
	FeatureValueForName(featureName string) FeatureValue
	HasFeatureValueForName() bool

	// optional
	FeatureNames() foundation.Set
	HasFeatureNames() bool
}

An interface that represents a collection of values for either a model's input or its output. Full Topic

type PWritable

type PWritable interface {
	// optional
	WriteToURLError(url foundation.URL, error unsafe.Pointer) bool
	HasWriteToURLError() bool
}

A set of methods that saves a machine learning type to the file system. Full Topic

type ParameterDescription

type ParameterDescription struct {
	objc.Object
}

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

func NewParameterDescription

func NewParameterDescription() ParameterDescription

func ParameterDescriptionFrom

func ParameterDescriptionFrom(ptr unsafe.Pointer) ParameterDescription

func (ParameterDescription) DefaultValue

func (p_ ParameterDescription) DefaultValue() objc.Object

The default value for the parameter. Full Topic

func (ParameterDescription) Init

func (ParameterDescription) Key

The key for this parameter description value. Full Topic

func (ParameterDescription) NumericConstraint

func (p_ ParameterDescription) NumericConstraint() NumericConstraint

The constraints of this paramter description value, if and only if the value is numerical. Full Topic

type ParameterKey

type ParameterKey struct {
	Key
}

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

func NewParameterKey

func NewParameterKey() ParameterKey

func ParameterKeyFrom

func ParameterKeyFrom(ptr unsafe.Pointer) ParameterKey

func ParameterKey_Beta1

func ParameterKey_Beta1() ParameterKey

The key you use to access the Adam optimizer’s first beta parameter. Full Topic

func ParameterKey_Beta2

func ParameterKey_Beta2() ParameterKey

The key you use to access the Adam optimizer’s second beta parameter. Full Topic

func ParameterKey_Biases

func ParameterKey_Biases() ParameterKey

The key you use to access the biases of a layer in a neural network model. Full Topic

func ParameterKey_Epochs

func ParameterKey_Epochs() ParameterKey

The key you use to access the optimizer’s epochs parameter. Full Topic

func ParameterKey_Eps

func ParameterKey_Eps() ParameterKey

The key you use to access the Adam optimizer’s epsilon parameter. Full Topic

func ParameterKey_LearningRate

func ParameterKey_LearningRate() ParameterKey

The key you use to access the optimizer’s learning rate parameter. Full Topic

func ParameterKey_LinkedModelFileName

func ParameterKey_LinkedModelFileName() ParameterKey

The key you use to access the linked model’s filename. Full Topic

func ParameterKey_LinkedModelSearchPath

func ParameterKey_LinkedModelSearchPath() ParameterKey

The key you use to access the linked model’s search path. Full Topic

func ParameterKey_MiniBatchSize

func ParameterKey_MiniBatchSize() ParameterKey

The key you use to access the optimizer’s mini batch-size parameter. Full Topic

func ParameterKey_Momentum

func ParameterKey_Momentum() ParameterKey

The key you use to access the stochastic gradient descent (SGD) optimizer’s momentum parameter. Full Topic

func ParameterKey_NumberOfNeighbors

func ParameterKey_NumberOfNeighbors() ParameterKey

The key you use to access the number of neighbors that adjusts the affinity of a k-nearest-neighbor model. Full Topic

func ParameterKey_Seed

func ParameterKey_Seed() ParameterKey

The key you use to access the seed parameter that initializes the random number generator for the shuffle option. Full Topic

func ParameterKey_Shuffle

func ParameterKey_Shuffle() ParameterKey

The key you use to access the shuffle parameter, a Boolean value that determines whether the model randomizes the data between epochs. Full Topic

func ParameterKey_Weights

func ParameterKey_Weights() ParameterKey

The key you use to access the weights of a layer in a neural network model. Full Topic

func (ParameterKey) Init

func (p_ ParameterKey) Init() ParameterKey

func (ParameterKey) ScopedTo

func (p_ ParameterKey) ScopedTo(scope string) ParameterKey

Creates a copy of a parameter key and adds the scope to it. Full Topic

type PredictionOptions

type PredictionOptions struct {
	objc.Object
}

The options available when making a prediction. Full Topic

func NewPredictionOptions

func NewPredictionOptions() PredictionOptions

func PredictionOptionsFrom

func PredictionOptionsFrom(ptr unsafe.Pointer) PredictionOptions

func (PredictionOptions) Init

func (PredictionOptions) OutputBackings

func (p_ PredictionOptions) OutputBackings() map[string]objc.Object

A dictionary of feature names and client-allocated buffers. Full Topic

func (PredictionOptions) SetOutputBackings

func (p_ PredictionOptions) SetOutputBackings(value map[string]objc.IObject)

A dictionary of feature names and client-allocated buffers. Full Topic

type Sequence

type Sequence struct {
	objc.Object
}

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

func NewSequence

func NewSequence() Sequence

func SequenceFrom

func SequenceFrom(ptr unsafe.Pointer) Sequence

func Sequence_EmptySequenceWithType

func Sequence_EmptySequenceWithType(type_ FeatureType) Sequence

Creates an empty sequence of strings or integers. Full Topic

func Sequence_SequenceWithInt64Array

func Sequence_SequenceWithInt64Array(int64Values []foundation.INumber) Sequence

Creates a sequence of integers from an array of numbers. Full Topic

func Sequence_SequenceWithStringArray

func Sequence_SequenceWithStringArray(stringValues []string) Sequence

Creates a sequence of strings from a string array. Full Topic

func (Sequence) Init

func (s_ Sequence) Init() Sequence

func (Sequence) Int64Values

func (s_ Sequence) Int64Values() []foundation.Number

An array of 64-bit integers in the sequence. Full Topic

func (Sequence) StringValues

func (s_ Sequence) StringValues() []string

An array of strings in the sequence. Full Topic

func (Sequence) Type

func (s_ Sequence) Type() FeatureType

The underlying type of the sequence’s elements. Full Topic

type SequenceConstraint

type SequenceConstraint struct {
	objc.Object
}

The constraints for a sequence feature. Full Topic

func NewSequenceConstraint

func NewSequenceConstraint() SequenceConstraint

func SequenceConstraintFrom

func SequenceConstraintFrom(ptr unsafe.Pointer) SequenceConstraint

func (SequenceConstraint) CountRange

func (s_ SequenceConstraint) CountRange() foundation.Range

The range of values allowed for the sequence's length. Full Topic

func (SequenceConstraint) Init

func (SequenceConstraint) ValueDescription

func (s_ SequenceConstraint) ValueDescription() FeatureDescription

The description that all sequence elements must match. Full Topic

type Task

type Task struct {
	objc.Object
}

An abstract base class for machine learning tasks. Full Topic

func NewTask

func NewTask() Task

func TaskFrom

func TaskFrom(ptr unsafe.Pointer) Task

func (Task) Cancel

func (t_ Task) Cancel()

Cancels a machine learning task before it completes. Full Topic

func (Task) Error

func (t_ Task) Error() foundation.Error

The underlying error if the task is in a failed state. Full Topic

func (Task) Init

func (t_ Task) Init() Task

func (Task) Resume

func (t_ Task) Resume()

Begins or resumes a machine learning task. Full Topic

func (Task) State

func (t_ Task) State() TaskState

The current state of the machine learning task. Full Topic

func (Task) TaskIdentifier

func (t_ Task) TaskIdentifier() string

A unique name of the task to distinguish it from all other tasks at runtime. Full Topic

type TaskState

type TaskState int

The state of a machine learning task. Full Topic

const (
	TaskStateCancelling TaskState = 3
	TaskStateCompleted  TaskState = 4
	TaskStateFailed     TaskState = 5
	TaskStateRunning    TaskState = 2
	TaskStateSuspended  TaskState = 1
)

type UpdateContext

type UpdateContext struct {
	objc.Object
}

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

func NewUpdateContext

func NewUpdateContext() UpdateContext

func UpdateContextFrom

func UpdateContextFrom(ptr unsafe.Pointer) UpdateContext

func (UpdateContext) Event

The event type that triggered an update task to notify your app’s completion and update progress handlers. Full Topic

func (UpdateContext) Init

func (u_ UpdateContext) Init() UpdateContext

func (UpdateContext) Metrics

func (u_ UpdateContext) Metrics() foundation.Dictionary

The training metrics of the model for the update task, contained in a dictionary. Full Topic

func (UpdateContext) Model

func (u_ UpdateContext) Model() Model

The underlying Core ML model stored in memory. Full Topic

func (UpdateContext) Parameters

func (u_ UpdateContext) Parameters() foundation.Dictionary

The parameters for the update task. Full Topic

func (UpdateContext) Task

func (u_ UpdateContext) Task() UpdateTask

The update task that generated the update context. Full Topic

type UpdateProgressEvent

type UpdateProgressEvent int

A type of event during a model update task. Full Topic

const (
	UpdateProgressEventEpochEnd      UpdateProgressEvent = 2
	UpdateProgressEventMiniBatchEnd  UpdateProgressEvent = 4
	UpdateProgressEventTrainingBegin UpdateProgressEvent = 1
)

type UpdateProgressHandlers

type UpdateProgressHandlers struct {
	objc.Object
}

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

func NewUpdateProgressHandlers

func NewUpdateProgressHandlers() UpdateProgressHandlers

func NewUpdateProgressHandlersForEventsProgressHandlerCompletionHandler

func NewUpdateProgressHandlersForEventsProgressHandlerCompletionHandler(interestedEvents UpdateProgressEvent, progressHandler func(context UpdateContext), completionHandler func(context UpdateContext)) UpdateProgressHandlers

Creates the collection of closures an update task uses to notify your app of its progress. Full Topic

func UpdateProgressHandlersFrom

func UpdateProgressHandlersFrom(ptr unsafe.Pointer) UpdateProgressHandlers

func (UpdateProgressHandlers) Init

func (UpdateProgressHandlers) InitForEventsProgressHandlerCompletionHandler

func (u_ UpdateProgressHandlers) InitForEventsProgressHandlerCompletionHandler(interestedEvents UpdateProgressEvent, progressHandler func(context UpdateContext), completionHandler func(context UpdateContext)) UpdateProgressHandlers

type UpdateTask

type UpdateTask struct {
	Task
}

A task that updates a model with additional training data. Full Topic

func NewUpdateTask

func NewUpdateTask() UpdateTask

func UpdateTaskFrom

func UpdateTaskFrom(ptr unsafe.Pointer) UpdateTask

func UpdateTask_UpdateTaskForModelAtURLTrainingDataCompletionHandlerError

func UpdateTask_UpdateTaskForModelAtURLTrainingDataCompletionHandlerError(modelURL foundation.IURL, trainingData PBatchProvider, completionHandler func(arg0 UpdateContext), error unsafe.Pointer) UpdateTask

Creates a task that updates the model at the URL with the training data, and calls the completion handler when the update completes. Full Topic

func UpdateTask_UpdateTaskForModelAtURLTrainingDataConfigurationCompletionHandlerError

func UpdateTask_UpdateTaskForModelAtURLTrainingDataConfigurationCompletionHandlerError(modelURL foundation.IURL, trainingData PBatchProvider, configuration IModelConfiguration, completionHandler func(context UpdateContext), error unsafe.Pointer) UpdateTask

Creates a task that updates the model at the URL with the training data and configuration, and calls the completion handler when the update completes. Full Topic

func UpdateTask_UpdateTaskForModelAtURLTrainingDataConfigurationProgressHandlersError

func UpdateTask_UpdateTaskForModelAtURLTrainingDataConfigurationProgressHandlersError(modelURL foundation.IURL, trainingData PBatchProvider, configuration IModelConfiguration, progressHandlers IUpdateProgressHandlers, error unsafe.Pointer) UpdateTask

Creates a task that updates the model at the URL with the training data and configuration, and calls the progress handlers during and after the update. Full Topic

func UpdateTask_UpdateTaskForModelAtURLTrainingDataProgressHandlersError

func UpdateTask_UpdateTaskForModelAtURLTrainingDataProgressHandlersError(modelURL foundation.IURL, trainingData PBatchProvider, progressHandlers IUpdateProgressHandlers, error unsafe.Pointer) UpdateTask

Creates a task that updates the model at the URL with the training data, and calls the progress handlers during and after the update. Full Topic

func (UpdateTask) Init

func (u_ UpdateTask) Init() UpdateTask

func (UpdateTask) ResumeWithParameters

func (u_ UpdateTask) ResumeWithParameters(updateParameters foundation.Dictionary)

Resumes a model update with updated parameter values. Full Topic

type WritableObject

type WritableObject struct {
	objc.Object
}

A concrete type for the PWritable protocol.

func (WritableObject) HasWriteToURLError

func (w_ WritableObject) HasWriteToURLError() bool

func (WritableObject) WriteToURLError

func (w_ WritableObject) WriteToURLError(url foundation.URL, error unsafe.Pointer) bool

Exports a machine learning file to the file system. Full Topic

Jump to

Keyboard shortcuts

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