Description: Slicing does not produce the same shape output after conversion if a variable is used as index.
code snippet
input = tf.keras.Input(shape=(( 114*4,122*5, 3)))
h = tf.shape(input)[1]
h2 = tf.cast(tf.math.divide(h,2), tf.int32)
x = input[:, h2: , : , :]
model = tf.keras.Model(input, x)
onnx_model = keras2onnx.convert_keras(model, model.name)
Running a (1, 456, 610, 3) input using tensorflow returns an output of shape (1, 228, 610, 3) while the onnx output returns a tensor of shape (1, 456, 610, 3).
I am fairly new to the Onnx, and am attempting to convert a custom model, but ran into the above issue in a middle layer where I attempt to half the image. I would appreciate any help getting the simple operation above to work, thank you.
Tensorflow version: 2.2 Keras onnx version: 1.7.0
Description: Slicing does not produce the same shape output after conversion if a variable is used as index.
code snippet
Running a (1, 456, 610, 3) input using tensorflow returns an output of shape (1, 228, 610, 3) while the onnx output returns a tensor of shape (1, 456, 610, 3).
I am fairly new to the Onnx, and am attempting to convert a custom model, but ran into the above issue in a middle layer where I attempt to half the image. I would appreciate any help getting the simple operation above to work, thank you.