
Core ML: Integrate machine learning models into your app - yonilevy
https://developer.apple.com/documentation/coreml
======
eggie5
Apple's new iOS CoreML inference engine supports Keras models! Developers will
be able to design and train model using Keras and then convert the
architecture to run on the CoreML engine. I suppose you can run TensorFlow
models too if you designed them w/ Keras.

~~~
likelynew
Yeah, that is surprising given that keras is not a language, but a
continuously changing python class. How bug complete is the conversion? What
about some new features like attention? And what about the future changes in
keras?

~~~
jordansmithnz
I think they mentioned in the Core ML lab that the conversion tool is being
open sourced - which would help with these issues.

------
blt
Cool that the file format is officially specified as a Protocol Buffer:
[https://developer.apple.com/documentation/coreml/converting_...](https://developer.apple.com/documentation/coreml/converting_trained_models_to_core_ml)
(bottom of page)

~~~
simplehuman
Is there a protobuf to capnproto converter?

------
seanmcdirmid
When "Core ML" is no longer a mini language to reason about ML the PL
semantics...

~~~
pjmlp
Yeah, it crossed my mind as well.

But nowadays every time I see ML on HN, it happens to mean ML = Machine
Learning instead of ML = programming language.

~~~
simplify
It's also going to make the name ReasonML even more confusing, considering you
can apply the word "Reason" to machine learning...

~~~
seanmcdirmid
Someone in the ML programming language community should use the name DeepML to
further sow the seeds of confusion.

------
singularity2001
"BNNS does not do training, however. Its purpose is to provide very high
performance inference on already trained neural networks." :(

[https://developer.apple.com/documentation/accelerate/bnns](https://developer.apple.com/documentation/accelerate/bnns)

~~~
eggie5
yes, it's an inference engine that runs pre-built architectures. why would you
want to train on the device?

~~~
singularity2001
Maybe not fully train but fine tune on the user data ( images, voice,
surroundings, etc, etc)

~~~
eggie5
oh, you're talking about updating parameters. Maybe sending that new data home
and train a new model and then update parameters across all devices in fleet.

~~~
suprfnk
> Maybe sending that new data home

I'd assume Apple does not allow this.

~~~
mattnewton
Apple would allow this with privacy statements, it's practically the industry
standard right now. Of course Facebook is doing this for instance.

However it could be a killer feature to have easy api's for doing
personalization all on device.

------
kensai
"Core ML is optimized for on-device performance, which minimizes memory
footprint and power consumption."

This is major, if they have managed to achieve it reasonably. But before
opening a Sekt, I want to see some benchmarks. :)

------
jamesswift3
Federighi says Core ML on iPhone is 6x faster than Google Pixel and Samsung
Galaxy S8.

How they actually compare?

~~~
suyash
The probably ran the same tests on Android using Pixel and S8 and then on
iPhone (which leveraged CoreML). I would like to see a more detailed analysis
myself.

------
hackerbot
using it means need to handle Android with another framework separately

~~~
mksmurf777
Is there any cross-platform framework recommended?

~~~
asadlionpk
check Caffe 2. I haven't tried that yet but looks promising.

~~~
mksmurf777
ok, get it.

------
db3d
Lots of options to explore, but no reinforcement learning yet.

Also, some converted Core ML Models ready to use here:
developer.apple.com/machine-learning

~~~
halflings
Reinforcement Learning relates to the way you train your model. Most of the
time, it ends up being a feed-forward neural net (possibly with some
convolutional layers), and rarely an RNN, all of which are supported.

------
ajay-d
The python package, coremltools, to convert the trained model is only for
python 2.7??

~~~
breatheoften
Is python3 shipped on OS X by default? I'm not sure why they are still
shipping 2.x -- anyone know if 3.x will be shipped in high sierra?

A bit disappointed that the model conversion tool only supports an older
version of Keras as well (1.2.2). Keras 2.0 is pretty new but I hope they
update the conversion tools for it quickly ...

I wonder if the conversion tool will be open source ... seems like they'd want
to support the widest net of external models since they don't yet have a way
to produce .coreml models directly. Or maybe the intent is to augment
Keras/caffe/etc to support saving .coreml directly?

~~~
jdr0317
Both python 2 (/usr/bin/python) and python 3 (/usr/bin/python3) are shipped by
default on Ubuntu.

Right now, coremltools is only available for Python 2.7
([https://pypi.python.org/pypi/coremltools](https://pypi.python.org/pypi/coremltools)),
which is annoying as the entire code base I've worked on for months at my
current firm is in Python 3.6. Hopefully this is updated soon for Python 3
support.

------
dmix
Having a directory of trained models to download is an interesting concept.
This will certainly accelerate the adoption of ML.

------
OldeElk
Does it support caffe/TensorFlow/MXnet model inferencing?

------
mtw
Why not caffe2? And why mention libsvm, are we in the 90s?

~~~
wodenokoto
Because SVM is fast and more than good enough for most problems.

~~~
eggie5
I think he's talking about libsvm, the c++ package

~~~
wodenokoto
It's there because they want to include SVM.

So, same answer.

------
killin_dan
Machine Learning needs a new acronym. ML is already taken! Get your own!

~~~
castis
Which of these 109 entries is objectively the definitive one?

[http://www.acronymfinder.com/ML.html](http://www.acronymfinder.com/ML.html)

~~~
Skunkleton
At this point, I would like to nominate Malt Liquor.

