def _block_b_reduce(net, endpoints, scope='BlockReduceB'):
# 17 x 17 -> 8 x 8 reduce
with arg_scope([layers.conv2d, layers.max_pool2d, layers.avg_pool2d], padding='VALID'):
with tf.variable_scope(scope):
with tf.variable_scope('Br1_Pool'):
br1 = layers.max_pool2d(net, [3, 3], stride=2, scope='Pool1_3x3/2')
with tf.variable_scope('Br2_3x3'):
br2 = layers.conv2d(net, 192, [1, 1], padding='SAME', scope='Conv1_1x1')
br2 = layers.conv2d(br2, 192, [3, 3], stride=2, scope='Conv2_3x3/2')
with tf.variable_scope('Br3_7x7x3'):
br3 = layers.conv2d(net, 256, [1, 1], padding='SAME', scope='Conv1_1x1')
br3 = layers.conv2d(br3, 256, [1, 7], padding='SAME', scope='Conv2_1x7')
br3 = layers.conv2d(br3, 320, [7, 1], padding='SAME', scope='Conv3_7x1')
br3 = layers.conv2d(br3, 320, [3, 3], stride=2, scope='Conv4_3x3/2')
net = tf.concat(3, [br1, br2, br3], name='Concat1')
endpoints[scope] = net
print('%s output shape: %s' % (scope, net.get_shape()))
return net
build_inception_v4.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录