Releases: apple/coremltools
Releases · apple/coremltools
coremltools-0.7.0
Neural Networks
- Half precision weights
- New to .mlmodel specification version 2
- Supported by macOS 10.13.2, iOS 11.2, watchOS 4.2, tvOS 11.2
- WeightParams can now be specified in half precision (float16)
- New float16 conversion utility function can convert existing models with neural networks to half precision by calling coremltools.utils.convert_neural_network_spec_weights_to_fp16
- Can also pass in a flag in keras or caffe converter functions during model conversion time to convert models to half precision
- See: https://developer.apple.com/documentation/coreml/reducing_the_size_of_your_core_ml_app
- Custom Layers
- New to .mlmodel specification version 2
- Supported by macOS 10.13.2, iOS 11.2, watchOS 4.2, tvOS 11.2
- Added CustomLayerParams message to possible layers
- NeuralNetworkBuilder has new add_custom method
- Keras converter has options for using custom layers. See add_custom_layers and custom_conversion_functions arguments
- See: https://developer.apple.com/documentation/coreml/core_ml_api/creating_a_custom_layer
Visualization
- Visualize model specification with: coremltools.utils.visualize_spec
Python 3
- Conversion for most model types work in Python 3.
- No predictions: #37
- Converting Caffe models does not work: #79
- To use in Python 3, you must build from source.
Misc
- Support grayscale image outputs in python predictions
- Bug fixes
coremltools-0.6.3
Features
- Linux support
- Added a “useCPUOnly” flag that lets you run predictions using CoreML through Python bindings using only the CPU
Note: coremltools-0.6.2 has a known issue with the useCPUOnly flag that failed on certain neural network models. This has been fixed with 0.6.3
Neural Network Builder
Added support for layers in the NeuralNetworkBuilder that were present in the neural network protobuf but missing from the builder:
- Local response normalization (LRN) layer
- Split layer
- Unary function layer
- Bias, scale layers
- Load constant layer
- L2 normalization layer
- Mean variance normalization (MVN) layer
- Elementwise min layer
- Depthwise and separable convolutions
Added support for some of the missing parameters in NeuralNetworkBuilder:
- Padding options in convolution, pooling and padding layers
- Scale and shift options for linear activation
Other bug fixes & enhancements
- Bug-fix in the caffe converter that was preventing the elementwise max layer from converting.
- Support for converting DepthwiseConv2D and SeparableConv2D from Keras