Coremltools

Latest version: v7.2

Safety actively analyzes 637125 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

4.0b2

What's New

* Improved **documentation** available at [http://coremltools.readme.io](http://coremltools.readme.io/).
* New converter path to directly convert **PyTorch** models without going through ONNX.
* Enhanced **TensorFlow 2** conversion support, which now includes support for dynamic control flow and LSTM layers. Support for several popular models and architectures, including Transformers such as GPT and BERT-variants.
* New **unified conversion API** `ct.convert()` for converting PyTorch and TensorFlow (including `tf.keras`) models.
* New **Model Intermediate Language (MIL)** builder library to either build neural network models directly or [implement composite operations](https://coremltools.readme.io/docs/composite-operators).
* New utilities to configure inputs while converting from PyTorch and TensorFlow, using `ct.convert()` with `ct.ImageType()`, `ct.ClassifierConfig()`, etc., see details: https://coremltools.readme.io/docs/neural-network-conversion.
* [onnx-coreml](https://github.com/onnx/onnx-coreml) converter is now moved under coremltools and can be accessed as `ct.converters.onnx.convert()`.

Deprecations

* Deprecated the following methods
* `NeuralNetworkShaper` class.
* `get_allowed_shape_ranges()`.
* `can_allow_multiple_input_shapes()`.
* `visualize_spec()` method of the `MLModel` class.
* `quantize_spec_weights()`, instead use the `quantize_weights()` method.
* `get_custom_layer_names()`,` replace_custom_layer_name()`, `has_custom_layer()`, moved them to internal methods.

* Added deprecation warnings for, will be deprecated in next major release.
* `convert_neural_network_weights_to_fp16()`, `convert_neural_network_spec_weights_to_fp16()`. Instead use the `quantize_weights()` method. See https://coremltools.readme.io/docs/quantization for details.

Known Issues

* Latest version of Pytorch tested to work with the converter is Torch 1.5.0.
* TensorFlow 2 model conversion is supported for models with 1 concrete function.
* Conversion for TensorFlow and PyTorch models with quantized weights is currently not supported.
* `coremltools.utils.rename_feature` does not work correctly in renaming the output feature of a model of type neural network classifier
* `leaky_relu` layer is not added yet to the PyTorch converter, although it's supported in MIL and the Tensorflow converters.

4.0b1

Whats New

* New **documentation** available at [http://coremltools.readme.io](http://coremltools.readme.io/).
* New converter path to directly convert **PyTorch** models without going through ONNX.
* Enhanced **TensorFlow 2** conversion support, which now includes support for dynamic control flow and LSTM layers. Support for several popular models and architectures, including Transformers such as GPT and BERT-variants.
* New **unified conversion API** `ct.convert()` for converting PyTorch and TensorFlow (including `tf.keras`) models.
* New **Model Intermediate Language (MIL)** builder library to either build neural network models directly or [implement composite operations](https://coremltools.readme.io/docs/composite-operators).
* New utilities to configure inputs while converting from PyTorch and TensorFlow, using `ct.convert()` with `ct.ImageType()`, `ct.ClassifierConfig()`, etc., see details: https://coremltools.readme.io/docs/neural-network-conversion.
* [onnx-coreml](https://github.com/onnx/onnx-coreml) converter is now moved under coremltools and can be accessed as `ct.converters.onnx.convert()`.

Deprecations

* Deprecated the following methods
* `NeuralNetworkShaper` class.
* `get_allowed_shape_ranges()`.
* `can_allow_multiple_input_shapes()`.
* `visualize_spec()` method of the `MLModel` class.
* `quantize_spec_weights()`, instead use the `quantize_weights()` method.
* `get_custom_layer_names()`,` replace_custom_layer_name()`, `has_custom_layer()`, moved them to internal methods.

* Added deprecation warnings for, will be deprecated in next major release.
* `convert_neural_network_weights_to_fp16()`, `convert_neural_network_spec_weights_to_fp16()`. Instead use the `quantize_weights()` method. See https://coremltools.readme.io/docs/quantization for details.

Known Issues

* Tensorflow 2 model conversion is supported for models with 1 concrete function.
* Conversion for TensorFlow and PyTorch models with quantized weights is currently not supported.
* `coremltools.utils.rename_feature` does not work correctly in renaming the output feature of a model of type neural network classifier
* `leaky_relu` layer is not added yet to the PyTorch converter, although its supported in MIL and the Tensorflow converters.

3.4

- Added support for `tf.einsum` op
- Bug fixes in image pre-processing error handling, quantization function for the `embeddingND` layer, conversion of `tf.stack` op
- Updated the transpose removal mlmodel pass
- Fixed import statement to support scikit-learn >=0.21 (sapieneptus )
- Added deprecation warnings for class `NeuralNetworkShaper` and methods `visualize_spec`, `quantize_spec_weights`
- Updated the names of a few functions that were unintentionally exposed to the public API, to internal, by prepending with underscore. The original methods still work but deprecation warnings have been added.

3.3

Release Notes

Bug Fixes

* Add support for converting Softplus layer in coremltools.
* Fix in gelu and layer norm fusion pass.
* Simplified build & CI setup.
* Fixed critical numpy

3.2

This release includes new op conversion supports, bug fixes, and improved graph optimization passes.

Install/upgrade to the latest `coremltools` with `pip install --upgrade coremltools`.

More details can be found in [neural-network-guide.md](https://github.com/apple/coremltools/blob/master/docs/NeuralNetworkGuide.md).

3.1

Changes:

- Add support for TensorFlow 2.x file format (.h5, SavedModel, and concrete functions).
- Add support for several new ops, such as `AddV2`, `FusedBatchNormV3`.
- Bug fixes in the Tensorflow converter's op fusion graph pass.

Known Issues:

- `tf.keras` model conversion supported only with TensorFlow 2
- Currently, there are issues while invoking the TensorFlow 2.x model conversion in Python 2.x.
- Currently, there are issues while converting `tf.keras` graphs that contain recurrent layers.

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.