I am trying to add 'ReverseV2' operator support in keras-onnx.
TF ReverseV2 operator takes axes list as one of the input.
This list is missing from the 'operator.raw_operator' in __buildin.py where I am adding the new operator.
In the below example I am passing [2] as axes list and in keras-onnx I am able to find a way to read that value.
My model:
import tensorflow as tf
from tensorflow.keras.models import save_model
input = tf.keras.Input(shape=(3, 4), name='input')
s = tf.reverse(input,[2]) #here [1] is the access
model = tf.keras.models.Model(inputs=input, outputs=s)
save_model(model, "reverse.h5")
To debug:
Just add new Type ReverseV2 and add below dummy method in __buildin.py
@converter_func(TYPES.ReverseV2)
def convert_tf_reverse(scope, operator, container):
print("test") #add debug breakpoint here
I am trying to add 'ReverseV2' operator support in keras-onnx. TF ReverseV2 operator takes axes list as one of the input. This list is missing from the 'operator.raw_operator' in __buildin.py where I am adding the new operator. In the below example I am passing [2] as axes list and in keras-onnx I am able to find a way to read that value.
My model:
To debug: Just add new Type ReverseV2 and add below dummy method in __buildin.py
Visualization: