MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / MaxPooling

Function MaxPooling

tensorpack/models/pool.py:19–32  ·  view source on GitHub ↗

Same as `tf.layers.MaxPooling2D`. Default strides is equal to pool_size.

(
        inputs,
        pool_size,
        strides=None,
        padding='valid',
        data_format='channels_last')

Source from the content-addressed store, hash-verified

17 args_names=['pool_size', 'strides'],
18 name_mapping={'shape': 'pool_size', 'stride': 'strides'})
19def MaxPooling(
20 inputs,
21 pool_size,
22 strides=None,
23 padding='valid',
24 data_format='channels_last'):
25 """
26 Same as `tf.layers.MaxPooling2D`. Default strides is equal to pool_size.
27 """
28 if strides is None:
29 strides = pool_size
30 layer = tf.layers.MaxPooling2D(pool_size, strides, padding=padding, data_format=data_format)
31 ret = layer.apply(inputs, scope=tf.get_variable_scope())
32 return tf.identity(ret, name='output')
33
34
35@layer_register(log_shape=True)

Callers 13

resnet_backboneFunction · 0.90
resnet_backboneFunction · 0.90
resnet_c4_backboneFunction · 0.90
resnet_fpn_backboneFunction · 0.90
fpn_modelFunction · 0.90
build_graphMethod · 0.85
tower_funcFunction · 0.85
_get_NN_predictionMethod · 0.85
build_graphMethod · 0.85
additional_lossesMethod · 0.85
inceptionMethod · 0.85
get_logitsMethod · 0.85

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected