CoreMLTools: Keras backend function convertion

I have a keras backend function that calculates the gradient of the input image over a loss function. Similar to this example: https://blog.keras.io/category/demo.html

I could convert the model to CorelML format but I do not find how to convert the backend function. Is there a way to do it?
Thanks.

Replies

Since iOS 11.2 you can implement custom layers that are not supported by CoreML yet.

Check out the add_custom_layers parameter when converting your Keras model to CoreML and the documentation of MLCustomLayer on how to implement it in your app.