Serializing custom Keras layer

25 views Asked by At

I’m currently having some trouble serializing a custom normalization layer in keras to ONNX. I’m using the tf2onnx library.

The layer works by initially going through the dataset and finding the minimum and maximum value for each feature. Then, in the call method, it normalizes the input vector, X by calculating the following expression: (X - X_min) / (X_max - X_min)

I haven’t been able to find any useful guide on how to serialize custom keras layers to ONNX using tf2onnx. Can anybody provide me with an overview or perhaps some material in which it is explained?

Thank you all in advance

0

There are 0 answers