function depthwiseConv2d_(x, filter, strides, pad, dataFormat = "NHWC", dilations = [
    1,
    1
], dimRoundingMode) {
    const $x = (0, _tensorUtilEnv.convertToTensor)(x, "x", "depthwiseConv2d", "float32");
    const $filter = (0, _tensorUtilEnv.convertToTensor)(filter, "filter", "depthwiseConv2d", "float32");
    let x4D = $x;
    let reshapedTo4D = false;
    if ($x.rank === 3) {
        reshapedTo4D = true;
        x4D = (0, _reshape.reshape)($x, [
            1,
            $x.shape[0],
            $x.shape[1],
            $x.shape[2]
        ]);
    }
    _util.assert(x4D.rank === 4, ()=>`Error in depthwiseConv2d: input must be rank 4, but got ` + `rank ${x4D.rank}.`);
    _util.assert($filter.rank === 4, ()=>`Error in depthwiseConv2d: filter must be rank 4, but got rank ` + `${$filter.rank}.`);
    const inChannels = dataFormat === "NHWC" ? x4D.shape[3] : x4D.shape[1];
    _util.assert(inChannels === $filter.shape[2], ()=>`Error in depthwiseConv2d: number of input channels ` + `(${inChannels}) must match the inChannels dimension in ` + `filter ${$filter.shape[2]}.`);
    _convUtil.checkPadOnDimRoundingMode("depthwiseConv2d", pad, dimRoundingMode);
    const inputs = {
        x: x4D,
        filter: $filter
    };
    const attrs = {
        strides,
        pad,
        dataFormat,
        dilations,
        dimRoundingMode
    };
    // tslint:disable-next-line: no-unnecessary-type-assertion
    const res = (0, _engine.ENGINE).runKernel((0, _kernelNames.DepthwiseConv2dNative), inputs, attrs);
    if (reshapedTo4D) return (0, _reshape.reshape)(res, [
        res.shape[1],
        res.shape[2],
        res.shape[3]
    ]);
    return res;
}
Depthwise 2D convolution.

Given a 4D `input` array and a `filter` array of shape
`[filterHeight, filterWidth, inChannels, channelMultiplier]` containing
`inChannels` convolutional filters of depth 1, this op applies a
different filter to each input channel (expanding from 1 channel to
`channelMultiplier` channels for each), then concatenates the results
together. The output has `inChannels * channelMultiplier` channels.

See
[https://www.tensorflow.org/api_docs/python/tf/nn/depthwise_conv2d](
    https://www.tensorflow.org/api_docs/python/tf/nn/depthwise_conv2d)
for more details.

@param x The input tensor, of rank 4 or rank 3, of shape
    `[batch, height, width, inChannels]`. If rank 3, batch of 1 is
assumed.
@param filter The filter tensor, rank 4, of shape
    `[filterHeight, filterWidth, inChannels, channelMultiplier]`.
@param strides The strides of the convolution: `[strideHeight,
strideWidth]`. If strides is a single number, then `strideHeight ==
strideWidth`.
@param pad The type of padding algorithm.
  - `same` and stride 1: output will be of same size as input,
      regardless of filter size.
  - `valid`: output will be smaller than input if filter is larger
      than 1x1.
  - For more info, see this guide:
    [https://www.tensorflow.org/api_docs/python/tf/nn/convolution](
         https://www.tensorflow.org/api_docs/python/tf/nn/convolution)
@param dilations The dilation rates: `[dilationHeight, dilationWidth]`
    in which we sample input values across the height and width dimensions
    in atrous convolution. Defaults to `[1, 1]`. If `rate` is a single
    number, then `dilationHeight == dilationWidth`. If it is greater than
    1, then all values of `strides` must be 1.
@param dataFormat: An optional string from: "NHWC", "NCHW". Defaults to
    "NHWC". Specify the data format of the input and output data. With the
    default format "NHWC", the data is stored in the order of: [batch,
    height, width, channels]. Only "NHWC" is currently supported.
@param dimRoundingMode A string from: 'ceil', 'round', 'floor'. If none is
    provided, it will default to truncate.

@doc {heading: 'Operations', subheading: 'Convolution'}