This is the first beta release of coremltools 3 which aligns with the preview of Core ML 3. It includes a new version of the .mlmodel specification which brings with it support for:
* Updatable models
* More dynamic and expressive neural networks
* Nearest neighbor classifiers
* Recommenders
* Linked models
* Sound analysis preprocessing
* Runtime adjustable parameters
This release also enhances and introduces the following converters and utilities:
* Keras converter
* Adds support for converting training details using respect_trainable flag
* Scikit converter
* Nearest neighbor classifier conversion
* NeuralNetworkBuilder
* Support for all new layers introduced in CoreML 3
* Support for adding update details such as marking layers updatable, specifying a loss function and providing an optimizer
* KNearestNeighborsClassifierBuilder (new)
* Newly added to support simple programatic construction of nearest neighbor classifiers
* Tensorflow (new)
* A new tensorflow converter with improved graph transformation capabilities and support for version 4 of the .mlmodel specification
* This is used by the new tfcoreml beta converter package as well. Try it out with `pip install tfcoreml==0.4.0b1`
This release also adds Python 3.7 support for coremltools
Updatable Models
Core ML 3 supports 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 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 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 CoreML specification documentation (NeuralNetwork.proto).
* Support conversion of recurrent networks from TensorFlow
Known Issues