code: def AvgPooling(
          inputs,
          pool_size,
          strides=None,
          padding='valid',
          data_format='channels_last'):
      
      if strides is None:
          strides = pool_size
      layer = tf.layers.AveragePooling2D(pool_size, strides, padding=padding, data_format=data_format)
      ret = layer.apply(inputs, scope=tf.get_variable_scope())
      return tf.identity(ret, name='output')
docs: Same as `tf.layers.AveragePooling2D`. Default strides is equal to pool_size.