def global_max_pool(incoming, name='GlobalMaxPool'):
 input_shape = utils.get_incoming_shape(incoming)
 assert (len(input_shape) == 4), 'Incoming Tensor shape must be 4-D'
 with tf.name_scope(name):
  inference = tf.reduce_max(incoming, [1, 2])
 tf.add_to_collection(((tf.GraphKeys.LAYER_TENSOR + '/') + name), inference)
 return inference

def global_max_pool ( incoming , name = 'GlobalMaxPool' ) : input_shape = utils . get_incoming_shape ( incoming ) assert ( len ( input_shape ) == 4 ) , 'Incoming Tensor shape must be 4-D' with tf . name_scope ( name ) : inference = tf . reduce_max ( incoming , [ 1 , 2 ] ) tf . add_to_collection ( ( ( tf . GraphKeys . LAYER_TENSOR + '/' ) + name ) , inference ) return inference
global max pooling .