#NEWLINE# def average_pooling_2d( x , ksize , stride = None , pad = 0 , use_cudnn = True ) : #NEWLINE# #INDENT# 'Spatial average pooling function.\n\n    This function acts similarly to :class:`~functions.Convolution2D`, but\n    it computes the average of input spatial patch for each channel\n    without any parameter instead of computing the inner products.\n\n    Args:\n        x (~chainer.Variable): Input variable.\n        ksize (int or pair of ints): Size of pooling window. ``ksize=k`` and\n            ``ksize=(k, k)`` are equivalent.\n        stride (int or pair of ints or None): Stride of pooling applications.\n            ``stride=s`` and ``stride=(s, s)`` are equivalent. If None is\n            specified, then it uses same stride as the pooling window size.\n        pad (int or pair of ints): Spatial padding width for the input array.\n            ``pad=p`` and ``pad=(p, p)`` are equivalent.\n        use_cudnn (bool): If ``True`` and cuDNN is enabled, then this function\n            uses cuDNN as the core implementation.\n\n    Returns:\n        ~chainer.Variable: Output variable.\n\n    .. note::\n\n       This function currently does not support ``cover_all`` mode as\n       :func:`max_pooling_2d`. Average pooling runs in non-cover-all mode.\n\n    ' #NEWLINE# return AveragePooling2D ( ksize , stride , pad , False , use_cudnn ) ( pad )