coremltools 7.0b2
Pre-release
Pre-release
- The default neural network backend is now
mlprogramfor iOS15/macOS12. Previously callingcoremltools.convert()without providing theconvert_toor theminimum_deployment_targetarguments, used the lowest deployment target (iOS11/macOS10.13) and theneuralnetworkbackend. Now the conversion process will default to iOS15/macOS12 and themlprogrambackend. You can change this behavior by providing aminimum_deployment_targetorconvert_tovalue. - Changes default I/O type for Neural Networks to FP16 for iOS16/macOS13 or later when
mlprogrambackend is used. - Changes upper input range behavior when backend is
mlprogram:- If
RangeDimis used and no upper-bound is set (with a positive number), an exception will be raised. - If the user does not use the
inputsparameter but there are undetermined dim in input shape (for example, TF with "None" in input placeholder), it will be sanitized to a finite number (default_size + 1) and raise a warning.
- If
- New utility method for getting weight metadata:
coremltools.optimize.coreml.get_weights_metadata. This information can be used to customize optimization across ops when usingcoremltools.optimize.coremlAPIs. - Support for new PyTorch ops:
repeat_interleaveandunflatten. - New and updated iOS17/macOS14 ops:
batch_norm,conv,conv_transpose,expand_dims,gru,instance_norm,inverse,l2_norm,layer_norm,linear,local_response_norm,log,lstm,matmul,reshape_like,resample,resize,reverse,reverse_sequence,rnn,rsqrt,slice_by_index,slice_by_size,sliding_windows,squeeze,transpose. - Various other bug fixes, enhancements, clean ups and optimizations.
Special thanks to our external contributors for this release: @fukatani, @pcuenca, @KWiecko, @comeweber and @sercand