Skip to content

Commit 3b66fc4

Browse files
author
Anastasia Murzova
committed
Added reduce sum by channel support
1 parent ae4099b commit 3b66fc4

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

testdata/dnn/tensorflow/generate_tf_models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,14 @@ def keras_relu6(x):
579579
reduced = tf.reduce_sum(inp, axis=[2], keepdims=False)
580580
save(inp, reduced, 'sum_pool_by_axis')
581581
################################################################################
582+
inp = tf.placeholder(tf.float32, [1, 4, 2, 3], 'input')
583+
out = tf.math.reduce_sum(inp, axis=-1)
584+
save(inp, out, 'reduce_sum_channel')
585+
################################################################################
586+
inp = tf.placeholder(tf.float32, [1, 4, 2, 3], 'input')
587+
out = tf.math.reduce_sum(inp, axis=-1, keep_dims=True)
588+
save(inp, out, ('reduce_sum_channel', 'keep_dims'), is_gen_data=False)
589+
################################################################################
582590
inp = tf.placeholder(tf.float32, [2, 3, 4, 5], 'input')
583591
pool = tf.layers.average_pooling2d(inp, pool_size=1, strides=1, padding='SAME')
584592
l2norm = tf.nn.l2_normalize(pool, axis=-1)
224 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
222 Bytes
Binary file not shown.
160 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)