diff --git a/testdata/dnn/tensorflow/expand_dims_1_in.npy b/testdata/dnn/tensorflow/expand_dims_1_in.npy new file mode 100644 index 000000000..63d6f8aab Binary files /dev/null and b/testdata/dnn/tensorflow/expand_dims_1_in.npy differ diff --git a/testdata/dnn/tensorflow/expand_dims_1_net.pb b/testdata/dnn/tensorflow/expand_dims_1_net.pb new file mode 100644 index 000000000..33f8309d5 Binary files /dev/null and b/testdata/dnn/tensorflow/expand_dims_1_net.pb differ diff --git a/testdata/dnn/tensorflow/expand_dims_1_out.npy b/testdata/dnn/tensorflow/expand_dims_1_out.npy new file mode 100644 index 000000000..088312056 Binary files /dev/null and b/testdata/dnn/tensorflow/expand_dims_1_out.npy differ diff --git a/testdata/dnn/tensorflow/expand_dims_2_in.npy b/testdata/dnn/tensorflow/expand_dims_2_in.npy new file mode 100644 index 000000000..ebd7fdd0a Binary files /dev/null and b/testdata/dnn/tensorflow/expand_dims_2_in.npy differ diff --git a/testdata/dnn/tensorflow/expand_dims_2_net.pb b/testdata/dnn/tensorflow/expand_dims_2_net.pb new file mode 100644 index 000000000..4d7dfe9d8 Binary files /dev/null and b/testdata/dnn/tensorflow/expand_dims_2_net.pb differ diff --git a/testdata/dnn/tensorflow/expand_dims_2_out.npy b/testdata/dnn/tensorflow/expand_dims_2_out.npy new file mode 100644 index 000000000..a79044597 Binary files /dev/null and b/testdata/dnn/tensorflow/expand_dims_2_out.npy differ diff --git a/testdata/dnn/tensorflow/generate_tf_models.py b/testdata/dnn/tensorflow/generate_tf_models.py index 2a08c38ed..36949356c 100644 --- a/testdata/dnn/tensorflow/generate_tf_models.py +++ b/testdata/dnn/tensorflow/generate_tf_models.py @@ -1032,6 +1032,16 @@ def pad_depth(x, desired_channels): sub = 4.0 + sub save(inp, sub, prefix + 'bias_add_1', optimize=False) ################################################################################ +inp = tf.placeholder(tf.float32, [1, 2, 3, 4], 'input') +expand_dim = inp + 1 +expand_dim = tf.expand_dims(expand_dim, -2) +save(inp, expand_dim, prefix + 'expand_dims_1', optimize=False) +################################################################################ +inp = tf.placeholder(tf.float32, [1, 2, 3, 4, 5], 'input') +expand_dim = inp + 1 +expand_dim = tf.expand_dims(expand_dim, 2) +save(inp, expand_dim, prefix + 'expand_dims_2', optimize=False) +################################################################################ # Uncomment to print the final graph. # with tf.gfile.FastGFile('fused_batch_norm_net.pb', 'rb') as f: