class_docstr: Perform average pooling. Supports 1-D, 2-D, and 3-D pool (1, 2, or 3 spatial dimensions).
  
  Parameters
  ----------
  x: tensor<[n,C_in,\*D_in], T> (Required)
      *  ``3 <= rank <= 5``.
      *  ``D_in`` are spatial dimensions, ``1 <= len(D_in) <= 3``.
      *  ``C_in`` is the number of input channels or depth dimensions.
      *  ``n`` is the batch dimension.
  
  kernel_sizes: const tensor<[K], T> (Required)
      * The size of the window for each spatial dimension ``D_in`` of the
        input tensor.
      * ``K == len(D_in)``
  
  strides: const tensor<[S],i32> (Optional, default to all 1s)
      * Stride along each of the spatial dimensions.
      * ``S == len(D_in)``.
  
  pad_type: const str (Required)
      Must be one of ``valid``, ``same``, ``custom`` or ``same_lower``.
  
      * ``valid``: No padding. This is equivalent to custom pad with ``pad[i] = 0, for
        all i``.
      * ``same`` : This is equivalent to custom pad with ``pad[2*i] + pad[2*i+1] = kernel_size[i]``.
      * ``custom``: Specify custom padding in the parameter pad. note that ``same``
        padding is equivalent to custom padding with
        ``pad[2*i] + pad[2*i+1] = kernel_size[i]``.
      * ``same_lower``: Similar to ``same`` but the padding
        will place extra rows/cols on the top/left if the padding amount is odd.
  
  pad: const<[P],i32> (Optional. Default to all 0s)
      * ``pad`` represents the number of elements to pad before and after each
        dimension: ``pad[2*i], pad[2*i+1]`` are the pad size before and after spatial
        dimension ``i``.
      * ``P = 2 * len(D_in)``.
      * ``pad`` should be specified if and only if ``pad_type == custom``
  
  exclude_padding_from_average: const tensor<[], bool> (Optional, default to False)
      * If ``True``, padded values (0s) are excluded from the denominator count
        when computing the average over the kernel window.
  
  ceil_mode: const<bool>
      * Same as PyTorch's ``ceil`` mode.
      * ``ceil`` is used instead of floor in calculating the output size.
      * Optional, defaults to ``False``.
      * Only applicable when ``pad_type`` is ``valid`` or ``custom``.
      * When ``ceil_mode`` is True, padding must be symmetric; that is, if specified,
        ``pad[2*i] == pad[2*i+1]`` must hold.
  
  Returns
  -------
  tensor<[n, C_out,\*D_out], T>
      * Same rank as ``x``.
      * ``C_out`` is the number of output channels or depth dimensions.
      * When ``ceil_mode = False``:
          * ``D_out[i] = floor[(D_in[i] + pad[2*i] + pad[2*i+1] - kernel_sizes[i]) /
            strides[i]] +1, for i = 0, .., len(D_in) - 1`` is mathematically the same
            as (when all parameters involved are integers):
  
                * ``D_out[i] = ceil [(D_in[i] + pad[2*i] + pad[2*i+1] - kernel_size[i] - 1) / stride[i]], for i = 0, .., len(D_in) - 1``.
                * ``*D_out`` is all ones if ``global_pooling`` is ``true``.
  
      * When ``ceil_mode = True``:
          * ``D_out[i] = ceil[(D_in[i] + pad[2*i] + pad[2*i+1] - kernel_sizes[i]) / strides[i]] +1, for i = 0, .., len(D_in) - 1``
  
                * If  ``(D_out[i] - 1) * strides[i] >= D_in[i] + pad[2*i] and (pad[2*i] + pad[2*i+1] > 0)``
                  then ``D_out[i] = D_out[i] - 1``.
  
          * The first equation is same as:
  
              * ``D_out[i] = floor[(D_in[i] + pad[2*i] + pad[2*i+1] - kernel_sizes[i] + strides[i] - 1) / strides[i]] +1, for i = 0, .., len(D_in) - 1``
  
  Attributes
  ----------
  T: fp16, fp32
  
  See Also
  --------
  l2_pool, max_pool
class_docstr_tok: ["Perform","average","pooling",".","Supports","1-D",",","2-D",",","and","3-D","pool","(","1",",","2",",","or","3","spatial","dimensions",")",".","Parameters","--","--","--","--","--","x",":","tensor","<","[","n",",","C_in",",","\\","*","D_in","]",",","T",">","(","Required",")","*","``","3","<","=","rank","<","=","5","``",".","*","``","D_in","``","are","spatial","dimensions",",","``","1","<","=","len","(","D_in",")","<","=","3","``",".","*","``","C_in","``","is","the","number","of","input","channels","or","depth","dimensions",".","*","``","n","``","is","the","batch","dimension",".","kernel_sizes",":","const","tensor","<","[","K","]",",","T",">","(","Required",")","*","The","size","of","the","window","for","each","spatial","dimension","``","D_in","``","of","the","input","tensor",".","*","``","K","==","len","(","D_in",")","``","strides",":","const","tensor","<","[","S","]",",","i32",">","(","Optional",",","default","to","all","1s",")","*","Stride","along","each","of","the","spatial","dimensions",".","*","``","S","==","len","(","D_in",")","``",".","pad_type",":","const","str","(","Required",")","Must","be","one","of","``","valid","``",",","``","same","``",",","``","custom","``","or","``","same_lower","``",".","*","``","valid","``",":","No","padding",".","This","is","equivalent","to","custom","pad","with","``","pad","[","i","]","=","0",",","for","all","i","``",".","*","``","same","``",":","This","is","equivalent","to","custom","pad","with","``","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]","=","kernel_size","[","i","]","``",".","*","``","custom","``",":","Specify","custom","padding","in","the","parameter","pad",".","note","that","``","same","``","padding","is","equivalent","to","custom","padding","with","``","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]","=","kernel_size","[","i","]","``",".","*","``","same_lower","``",":","Similar","to","``","same","``","but","the","padding","will","place","extra","rows\/cols","on","the","top\/left","if","the","padding","amount","is","odd",".","pad",":","const","<","[","P","]",",","i32",">","(","Optional",".","Default","to","all","0s",")","*","``","pad","``","represents","the","number","of","elements","to","pad","before","and","after","each","dimension",":","``","pad","[","2","*","i","]",",","pad","[","2","*","i+1","]","``","are","the","pad","size","before","and","after","spatial","dimension","``","i","``",".","*","``","P","=","2","*","len","(","D_in",")","``",".","*","``","pad","``","should","be","specified","if","and","only","if","``","pad_type","==","custom","``","exclude_padding_from_average",":","const","tensor","<","[","]",",","bool",">","(","Optional",",","default","to","False",")","*","If","``","True","``",",","padded","values","(","0s",")","are","excluded","from","the","denominator","count","when","computing","the","average","over","the","kernel","window",".","ceil_mode",":","const","<","bool",">","*","Same","as","PyTorch","'s","``","ceil","``","mode",".","*","``","ceil","``","is","used","instead","of","floor","in","calculating","the","output","size",".","*","Optional",",","defaults","to","``","False","``",".","*","Only","applicable","when","``","pad_type","``","is","``","valid","``","or","``","custom","``",".","*","When","``","ceil_mode","``","is","True",",","padding","must","be","symmetric",";","that","is",",","if","specified",",","``","pad","[","2","*","i","]","==","pad","[","2","*","i+1","]","``","must","hold",".","Returns","--","--","--","-","tensor","<","[","n",",","C_out",",","\\","*","D_out","]",",","T",">","*","Same","rank","as","``","x","``",".","*","``","C_out","``","is","the","number","of","output","channels","or","depth","dimensions",".","*","When","``","ceil_mode","=","False","``",":","*","``","D_out","[","i","]","=","floor","[","(","D_in","[","i","]","+","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]","-","kernel_sizes","[","i","]",")","\/","strides","[","i","]","]","+1",",","for","i","=","0",",","..",",","len","(","D_in",")","-","1","``","is","mathematically","the","same","as","(","when","all","parameters","involved","are","integers",")",":","*","``","D_out","[","i","]","=","ceil","[","(","D_in","[","i","]","+","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]","-","kernel_size","[","i","]","-","1",")","\/","stride","[","i","]","]",",","for","i","=","0",",","..",",","len","(","D_in",")","-","1","``",".","*","``","*","D_out","``","is","all","ones","if","``","global_pooling","``","is","``","true","``",".","*","When","``","ceil_mode","=","True","``",":","*","``","D_out","[","i","]","=","ceil","[","(","D_in","[","i","]","+","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]","-","kernel_sizes","[","i","]",")","\/","strides","[","i","]","]","+1",",","for","i","=","0",",","..",",","len","(","D_in",")","-","1","``","*","If","``","(","D_out","[","i","]","-","1",")","*","strides","[","i","]",">","=","D_in","[","i","]","+","pad","[","2","*","i","]","and","(","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]",">","0",")","``","then","``","D_out","[","i","]","=","D_out","[","i","]","-","1","``",".","*","The","first","equation","is","same","as",":","*","``","D_out","[","i","]","=","floor","[","(","D_in","[","i","]","+","pad","[","2","*","i","]","+","pad","[","2","*","i+1","]","-","kernel_sizes","[","i","]","+","strides","[","i","]","-","1",")","\/","strides","[","i","]","]","+1",",","for","i","=","0",",","..",",","len","(","D_in",")","-","1","``","Attributes","--","--","--","--","--","T",":","fp16",",","fp32","See","Also","--","--","--","--","l2_pool",",","max_pool"]
code: def default_inputs(self):
      return super().default_inputs() + DefaultInputs(
          exclude_padding_from_average=False,
      )
  
file_path: coremltools/coremltools/converters/mil/mil/ops/defs/iOS15/pool.py
imports: from coremltools.converters.mil.mil import Operation, types
  from coremltools.converters.mil.mil.block import curr_opset_version
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs._utils import spatial_dimensions_out_shape
  from coremltools.converters.mil.mil.ops.defs.iOS15 import _IOS15_TARGET
label_desc: Use image node_id 1 for calling the avg_pool obj's underlying member method code with example usage: obj.default_inputs() and returns: unknown