One Logo Pool Ball
CoreML · IOS API REFERENCE

MLOptimizationHints

struct · iOS 17.4+ · SDK 27.1

struct MLOptimizationHints

Members (5)

get · iOS 17.4+

reshapeFrequency

TypeScript
get reshapeFrequency(): MLOptimizationHints_ReshapeFrequency
Swift declaration
var reshapeFrequency: MLOptimizationHints.ReshapeFrequency

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

set · iOS 17.4+

reshapeFrequency

TypeScript
set reshapeFrequency(value: MLOptimizationHints_ReshapeFrequency)
Swift declaration
var reshapeFrequency: MLOptimizationHints.ReshapeFrequency

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

get · iOS 18.0+

specializationStrategy

TypeScript
get specializationStrategy(): MLOptimizationHints_SpecializationStrategy
Swift declaration
var specializationStrategy: MLOptimizationHints.SpecializationStrategy

Optimization strategy for the model specialization. Core ML segments the model's compute graph and specializes 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 model.

set · iOS 18.0+

specializationStrategy

TypeScript
set specializationStrategy(value: MLOptimizationHints_SpecializationStrategy)
Swift declaration
var specializationStrategy: MLOptimizationHints.SpecializationStrategy

Optimization strategy for the model specialization. Core ML segments the model's compute graph and specializes 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 model.

init · iOS 17.4+

init

TypeScript
static init(): MLOptimizationHints
Swift declaration
init()

Construct an MLOptimizationHints

Skipped declarations

No declarations were skipped in this snapshot.

All CoreML types →