def AvgPool3D(a, k, strides, padding):
    """
    Average 3D pooling op.
    """
    patches = _pool_patches(a, k, strides, padding.decode("ascii"))
    return np.average(patches, axis=tuple(range(-len(k), 0))),