class_docstr: Two dimensional convolution.
class_docstr_tok: ["Two","dimensional","convolution","."]
docstr: Construct a 2D Depthwise Convolution.
  
  Args:
    channel_multiplier: Multiplicity of output channels. To keep the number of
      output channels the same as the number of input channels, set 1.
    kernel_shape: The shape of the kernel. Either an integer or a sequence of
      length 2.
    stride: Optional stride for the kernel. Either an integer or a sequence of
      length 2. Defaults to 1.
    rate: Optional kernel dilation rate. Either an integer or a sequence of
      length 1. 1 corresponds to standard ND convolution,
      ``rate > 1`` corresponds to dilated convolution. Defaults to 1.
    padding: Optional padding algorithm. Either ``VALID``, ``SAME`` or a
      sequence of ``before, after`` pairs. Defaults to ``SAME``. See:
      https://www.tensorflow.org/xla/operation_semantics#conv_convolution.
    with_bias: Whether to add a bias. By default, true.
    w_init: Optional weight initialization. By default, truncated normal.
    b_init: Optional bias initialization. By default, zeros.
    data_format: The data format of the input.  Can be either
      ``channels_first``, ``channels_last``, ``N...C`` or ``NC...``. By
      default, ``channels_last``. See :func:`get_channel_index`.
    name: The name of the module.
docstr_tok: ["Construct","a","2D","Depthwise","Convolution",".","Args",":","channel_multiplier",":","Multiplicity","of","output","channels",".","To","keep","the","number","of","output","channels","the","same","as","the","number","of","input","channels",",","set","1.","kernel_shape",":","The","shape","of","the","kernel",".","Either","an","integer","or","a","sequence","of","length","2.","stride",":","Optional","stride","for","the","kernel",".","Either","an","integer","or","a","sequence","of","length","2",".","Defaults","to","1.","rate",":","Optional","kernel","dilation","rate",".","Either","an","integer","or","a","sequence","of","length","1",".","1","corresponds","to","standard","ND","convolution",",","``","rate",">","1","``","corresponds","to","dilated","convolution",".","Defaults","to","1.","padding",":","Optional","padding","algorithm",".","Either","``","VALID","``",",","``","SAME","``","or","a","sequence","of","``","before",",","after","``","pairs",".","Defaults","to","``","SAME","``",".","See",":","https",":","\/\/www.tensorflow.org\/xla\/operation_semantics","#","conv_convolution",".","with_bias",":","Whether","to","add","a","bias",".","By","default",",","true",".","w_init",":","Optional","weight","initialization",".","By","default",",","truncated","normal",".","b_init",":","Optional","bias","initialization",".","By","default",",","zeros",".","data_format",":","The","data","format","of","the","input",".","Can","be","either","``","channels_first","``",",","``","channels_last","``",",","``","N","...","C","``","or","``","NC","...","``",".","By","default",",","``","channels_last","``",".","See",":","func",":","`","get_channel_index","`",".","name",":","The","name","of","the","module","."]
code: def __init__(
      self,
      channel_multiplier: int,
      kernel_shape: Union[int, Sequence[int]],
      stride: Union[int, Sequence[int]] = 1,
      rate: Union[int, Sequence[int]] = 1,
      padding: Union[str, Sequence[tuple[int, int]]] = "SAME",
      with_bias: bool = True,
      w_init: Optional[hk.initializers.Initializer] = None,
      b_init: Optional[hk.initializers.Initializer] = None,
      data_format: str = "NHWC",
      name: Optional[str] = None,
  ):
      """Construct a 2D Depthwise Convolution.
  
      Args:
        channel_multiplier: Multiplicity of output channels. To keep the number of
          output channels the same as the number of input channels, set 1.
        kernel_shape: The shape of the kernel. Either an integer or a sequence of
          length 2.
        stride: Optional stride for the kernel. Either an integer or a sequence of
          length 2. Defaults to 1.
        rate: Optional kernel dilation rate. Either an integer or a sequence of
          length 1. 1 corresponds to standard ND convolution,
          ``rate > 1`` corresponds to dilated convolution. Defaults to 1.
        padding: Optional padding algorithm. Either ``VALID``, ``SAME`` or a
          sequence of ``before, after`` pairs. Defaults to ``SAME``. See:
          https://www.tensorflow.org/xla/operation_semantics#conv_convolution.
        with_bias: Whether to add a bias. By default, true.
        w_init: Optional weight initialization. By default, truncated normal.
        b_init: Optional bias initialization. By default, zeros.
        data_format: The data format of the input.  Can be either
          ``channels_first``, ``channels_last``, ``N...C`` or ``NC...``. By
          default, ``channels_last``. See :func:`get_channel_index`.
        name: The name of the module.
      """
      super().__init__(
          num_spatial_dims=2,
          data_format=data_format,
          channel_multiplier=channel_multiplier,
          kernel_shape=kernel_shape,
          stride=stride,
          rate=rate,
          padding=padding,
          with_bias=with_bias,
          w_init=w_init,
          b_init=b_init,
          name=name,
      )
  
imports: from collections.abc import Sequence
  from typing import Optional, Union
  from haiku._src import base
  from haiku._src import initializers
  from haiku._src import module
  from haiku._src import utils
  import jax
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 to create a new DepthwiseConv2D object from inherited base classes: DepthwiseConvND with example: obj = DepthwiseConv2D(channel_multiplier, kernel_shape, stride, rate, padding, with_bias, w_init, b_init, data_format, name)