@scopes.add_arg_scope
def avg_pool(inputs, kernel_size, stride=2, padding='VALID', scope=None):
 with tf.name_scope(scope, 'AvgPool', [inputs]):
  (kernel_h, kernel_w) = _two_element_tuple(kernel_size)
  (stride_h, stride_w) = _two_element_tuple(stride)
  return tf.nn.avg_pool(inputs, ksize=[1, kernel_h, kernel_w, 1], strides=[1, stride_h, stride_w, 1], padding=padding)

@ scopes . add_arg_scope def avg_pool ( inputs , kernel_size , stride = 2 , padding = 'VALID' , scope = None ) : with tf . name_scope ( scope , 'AvgPool' , [ inputs ] ) : ( kernel_h , kernel_w ) = _two_element_tuple ( kernel_size ) ( stride_h , stride_w ) = _two_element_tuple ( stride ) return tf . nn . avg_pool ( inputs , ksize = [ 1 , kernel_h , kernel_w , 1 ] , strides = [ 1 , stride_h , stride_w , 1 ] , padding = padding )
adds a avg pooling layer .