depthwise_conv2d

dragon.nn.depthwise_conv2d(
  inputs,
  kernel_shape=3,
  strides=1,
  pads=0,
  dilations=1,
  padding='VALID',
  data_format='NCHW',
  **kwargs
)[source]

Apply the 2d depthwise convolution. [Chollet, 2016].

Set padding to VALID will use the value of pads.

Parameters:
  • inputs (Sequence[dragon.Tensor]) – The tensor x, weight and bias.
  • kernel_shape (Sequence[int], optional, default=3) – The size(s) of convolution kernel.
  • strides (Sequence[int], optional, default=1) – The stride(s) of sliding window.
  • pads (Sequence[int], optional, default=0) – The zero padding size(s) of convolution.
  • dilations (Sequence[int], optional, default=0) – The rate(s) of dilated kernel.
  • padding ({'VALID', 'SAME', 'SAME_UPPER', 'SAME_LOWER'}, optional) – The padding algorithm.
  • data_format ({'NCHW', 'NHWC'}, optional) – The optional data format.
Returns:

dragon.Tensor – The output tensor.