x = self._get_rnd_float32(shape=[5, 5, 5])
cond = np.array([1, 0, 1]).astype(np.bool)
tf_rep = onnx_graph_to_tensorflow_rep(graph_def)
output = tf_rep.run({"X": x, "condition": cond})
np.testing.assert_almost_equal(output["Y"], np.compress(cond, x, axis=axis))
def test_conv_transpose(self):
// test dynamic batch size on transpose of 2d convolution
After Change
// load the saved_model back
tf_model = tf.saved_model.load(model_path)
// run the model
tf_model_output = tf_model(X=x, condition=cond)
np.testing.assert_almost_equal(tf_model_output[0],
np.compress(cond, x, axis=axis))
def test_conv_transpose(self):