I've got the following error: https://pastebin.com/X7146Ury when running this script.
AttributeError: 'InputLayer' object has no attribute 'inbound_nodes'
In the latest version of Keras this was renamed to _inbound_nodes
(note the added underscore). The version of coremltools you're using does not appear to be compatible with that Keras version yet.
However, the latest version on GitHub does appear to use the new _inbound_nodes
name. I suggest you install that, using:
pip install -U git+https://github.com/apple/coremltools.git