def _max_pool(bottom, name, debug):
pool = tf.nn.max_pool(bottom, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1],
padding='SAME', name=name)
print('Layer name: %s' % name)
print('Layer shape:%s' % str(pool.get_shape()))
if debug:
pool = tf.Print(pool, [pool.get_shape()],
message='Shape of %s' % name,
summarize=4, first_n=1)
_activation_summary(pool)
return pool
评论列表
文章目录