pub struct Model {
pub specification_version: i32,
pub description: Option<ModelDescription>,
pub is_updatable: bool,
pub type: Option<Type>,
}Expand description
A Core ML model, consisting of a specification version, a model description, and a model type.
Core ML model compatibility is indicated by
a monotonically increasing specification version number,
which is incremented anytime a backward-incompatible change is made
(this is functionally equivalent to the MAJOR version number
described by Semantic Versioning 2.0.0 <<http://semver.org/>_>).
Specification Versions : OS Availability (Core ML Version)
1 : iOS 11, macOS 10.13, tvOS 11, watchOS 4 (Core ML 1)
- Feedforward & Recurrent Neural Networks
- General Linear Models
- Tree Ensembles
- Support Vector Machines
- Pipelines
- Feature Engineering
2 : iOS 11.2, macOS 10.13.2, tvOS 11.2, watchOS 4.2 (Core ML 1.2)
- Custom Layers for Neural Networks
- Float 16 support for Neural Network layers
3 : iOS 12, macOS 10.14, tvOS 12, watchOS 5 (Core ML 2)
- Flexible shapes and image sizes
- Categorical sequences
- Core ML Vision Feature Print, Text Classifier, Word Tagger
- Non Max Suppression
- Crop and Resize Bilinear NN layers
- Custom Models
4 : iOS 13, macOS 10.15, tvOS 13, watchOS 6 (Core ML 3)
- Updatable models
- Exact shape / general rank mapping for neural networks
- Large expansion of supported neural network layers
- Generalized operations
- Control flow
- Dynamic layers
- See NeuralNetwork.proto
- Nearest Neighbor Classifier
- Sound Analysis Prepreocessing
- Recommender
- Linked Model
- NLP Gazeteer
- NLP WordEmbedding
5 : iOS 14, macOS 11, tvOS 14, watchOS 7 (Core ML 4)
- Model Deployment
- Model Encryption
- Unified converter API with PyTorch and Tensorflow 2 Support in coremltools 4
- MIL builder for neural networks and composite ops in coremltools 4
- New layers in neural network: - CumSum - OneHot - ClampedReLu - ArgSort - SliceBySize - Convolution3D - Pool3D - Bilinear Upsample with align corners and fractional factors - PixelShuffle - MatMul with int8 weights and int8 activations - Concat interleave - See NeuralNetwork.proto
- Enhanced Xcode model view with interactive previews
- Enhanced Xcode Playground support for Core ML models
6 : iOS 15, macOS 12, tvOS 15, watchOS 8 (Core ML 5)
- Core ML Audio Feature Print
- new type of model: mlprogram (MILSpec.Program)
7 : iOS 16, macOS 13, tvOS 16, watchOS 9 (Core ML 6)
- FLOAT16 array data type
- GRAYSCALE_FLOAT16 image color space.
8 : iOS 17, macOS 14, tvOS 17, watchOS 10 (Core ML 7)
- iOS 17 ops
- Scene print v2
- ClassConfidenceThresholding model
9 : iOS 18, macOS 15, tvOS 18, watchOS 11 (Core ML 8)
- multiple functions
10 : iOS 26, macOS 26, tvOS 26, watchOS 26, visionOS 26 (Core ML 9)
- Int8 MultiArray types for ML Programs
Fields§
§specification_version: i32§description: Option<ModelDescription>§is_updatable: boolFollowing model types support on-device update:
- NeuralNetworkClassifier
- NeuralNetworkRegressor
- NeuralNetwork
- KNearestNeighborsClassifier
type: Option<Type>start at 200 here model specific parameters:
Trait Implementations§
Source§impl Message for Model
impl Message for Model
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.