Skip to content

Commit 1f236b3

Browse files
committed
add test case and fix bug
1 parent 5c5ad94 commit 1f236b3

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

testdata/dnn/tensorflow/generate_tf_models.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,13 @@ def keras_relu6(x):
594594
inp = tf.placeholder(tf.float32, [2, 3, 4, 5], 'input')
595595
reduced = tf.reduce_sum(inp, axis=[2], keepdims=False)
596596
save(inp, reduced, 'sum_pool_by_axis')
597-
# NWC -> NCW, NHC -> NWC
598-
np.save('sum_pool_by_axis_out.npy', np.load('sum_pool_by_axis_out.npy').transpose(0, 2, 1))
599-
597+
################################################################################
598+
# This test case generated by tensorflow 1.15.0
599+
inp = tf.placeholder(tf.float32, [2, 3, 4, 1])
600+
biasadd = tf.nn.bias_add(inp, [1],data_format='NHWC')
601+
reduced = tf.reduce_sum(biasadd,axis=[2],keep_dims=False)
602+
expanddim = tf.expand_dims(reduced,axis=2)
603+
save(inp,expanddim,'reduce_sum2')
600604
################################################################################
601605
inp = tf.placeholder(tf.float32, [1, 4, 2, 3], 'input')
602606
out = tf.math.reduce_sum(inp, axis=-1)
224 Bytes
Binary file not shown.
493 Bytes
Binary file not shown.
152 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)