We are happy to announce the official release of coremltools 3 which aligns with Core ML 3. It includes a new version of the .mlmodel specification (version 4) which brings with it support for:
* Updatable models - Neural Network and KNN
* More dynamic and expressive neural networks - approx. 100 more layers added compared to Core ML 2
* Dynamic control flows
* Nearest neighbor classifiers
* Recommenders
* Linked models
* Sound analysis preprocessing
* Runtime adjustable parameters for on-device update
This version of coremltools also includes a new converter path for TensorFlow models. The [tfcoreml converter](https://github.com/tf-coreml/tf-coreml) has been updated to include this new path to convert to specification 4 which can handle control flow and cyclic tensor flow graphs.
Control flow example can be found [here](https://github.com/apple/coremltools/blob/master/examples/Neural_network_control_flow_power_iteration.ipynb).
Updatable Models
Core ML 3 supports an on-device update of models. Version 4 of the `.mlmodel` specification can encapsulate all the necessary parameters for a model update. Nearest neighbor, neural networks and pipeline models can all be made updatable.
Updatable neural networks support the training of convolution and fully connected layer weights (with back-propagation through many other layers types). Categorical cross-entropy and mean squared error losses are available along with stochastic gradient descent and Adam optimizers.
See examples of how to convert and create [updatable models](https://github.com/apple/coremltools/tree/master/examples/updatable_models).
See the [MLUpdateTask API reference](https://developer.apple.com/documentation/coreml/mlupdatetask) for how to update a model from within an app.
Neural Networks
* Support for new layers in Core ML 3 added to the `NeuralNetworkBuilder`
* Exact rank mapping of multi dimensional array inputs
* Control Flow related layers (branch, loop, range, etc.)
* Element-wise unary layers (ceil, floor, sin, cos, gelu, etc.)
* Element-wise binary layers with broadcasting (addBroadcastable, multiplyBroadcastable, etc)
* Tensor manipulation layers (gather, scatter, tile, reverse, etc.)
* Shape manipulation layers (squeeze, expandDims, getShape, etc.)
* Tensor creation layers (fillDynamic, randomNormal, etc.)
* Reduction layers (reduceMean, reduceMax, etc.)
* Masking / Selection Layers (whereNonZero, lowerTriangular, etc.)
* Normalization layers (layerNormalization)
* For a full list of supported layers in Core ML 3, check out Core ML [specification documentation](https://apple.github.io/coremltools/coremlspecification/sections/NeuralNetwork.html) or [NeuralNetwork.proto](https://github.com/apple/coremltools/blob/c6e7d15e3aef676a60247fea235da58aedbfcfd7/mlmodel/format/NeuralNetwork.proto#L535).
* Support conversion of recurrent networks from [TensorFlow](https://github.com/tf-coreml/tf-coreml/releases)