coremltools 7.0b2
Pre-release
Pre-release
- The default neural network backend is now
mlprogram
for iOS15/macOS12. Previously callingcoremltools.convert()
without providing theconvert_to
or theminimum_deployment_target
arguments, used the lowest deployment target (iOS11/macOS10.13) and theneuralnetwork
backend. Now the conversion process will default to iOS15/macOS12 and themlprogram
backend. You can change this behavior by providing aminimum_deployment_target
orconvert_to
value. - Changes default I/O type for Neural Networks to FP16 for iOS16/macOS13 or later when
mlprogram
backend is used. - Changes upper input range behavior when backend is
mlprogram
:- If
RangeDim
is used and no upper-bound is set (with a positive number), an exception will be raised. - If the user does not use the
inputs
parameter 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.coreml
APIs. - Support for new PyTorch ops:
repeat_interleave
andunflatten
. - New and updated iOS17/macOS14 ops:
batch_norm
,conv
,con
v_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