jack@lemmy.nztoTensorFlow•Were there major performance improvements between 2.12.0 and 2.18.0?
2·
1 month agoYep, it essentially just provides a bunch of useful building blocks for networks and some time-saving tools so you don’t have to create them yourself using TensorFlow primitives.
This is a great minimal example! You’re on the right track regarding the input, it’s just that coreml expects the input shape to be fully defined, meaning it must be a 2D tensor of (batch_size, sequence_length).
If you change the conversion inputs line to be
inputs=[ct.TensorType(shape=(32, max_len), name="embedding_input", dtype=np.int32)],
instead of a 1-dimensional tensor you should be fine.
Also you may need to use mlpackage instead of mlmodel for the file extension.