From 8ee2e5b5b3542281e86f88f9320b5191c6c422f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=B8=96=E9=9D=92?= Date: Thu, 18 Oct 2018 10:52:31 +0800 Subject: [PATCH] fix the concat axis error in _expand 1*1 conv2d's out_shape is [batch_size, w,h,c ], so if want to concat two out, the axis should be -1 instead of 1 I think it's a small mistake --- networks/squeezenet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networks/squeezenet.py b/networks/squeezenet.py index 89f19cf1..65147406 100644 --- a/networks/squeezenet.py +++ b/networks/squeezenet.py @@ -30,7 +30,7 @@ def _expand(inputs, num_outputs): with tf.variable_scope('expand'): e1x1 = conv2d(inputs, num_outputs, [1, 1], stride=1, scope='1x1') e3x3 = conv2d(inputs, num_outputs, [3, 3], scope='3x3') - return tf.concat([e1x1, e3x3], 1) + return tf.concat([e1x1, e3x3], -1) class Squeezenet(object):