function conv1d_(x, filter, stride, pad, dataFormat = "NWC", dilation = 1, dimRoundingMode) {
    const $x = (0, _tensorUtilEnv.convertToTensor)(x, "x", "conv1d");
    const $filter = (0, _tensorUtilEnv.convertToTensor)(filter, "filter", "conv1d");
    let x3D = $x;
    let reshapedTo3D = false;
    if ($x.rank === 2) {
        reshapedTo3D = true;
        x3D = (0, _reshape.reshape)($x, [
            1,
            $x.shape[0],
            $x.shape[1]
        ]);
    }
    _util.assert(x3D.rank === 3, ()=>`Error in conv1d: input must be rank 3, but got rank ${x3D.rank}.`);
    _util.assert($filter.rank === 3, ()=>`Error in conv1d: filter must be rank 3, but got rank ` + `${$filter.rank}.`);
    _convUtil.checkPadOnDimRoundingMode("conv1d", pad, dimRoundingMode);
    _util.assert(x3D.shape[2] === $filter.shape[1], ()=>`Error in conv1d: depth of input (${x3D.shape[2]}) must match ` + `input depth for filter ${$filter.shape[1]}.`);
    _util.assert(_convUtil.eitherStridesOrDilationsAreOne(stride, dilation), ()=>"Error in conv1D: Either stride or dilation must be 1. " + `Got stride ${stride} and dilation '${dilation}'`);
    _util.assert(_convUtil.stridesOrDilationsArePositive(dilation), ()=>"Error in conv1D: Dilated rates should be larger than 0.");
    _util.assert(_convUtil.stridesOrDilationsArePositive(stride), ()=>"Error in conv1D: Stride should be larger than 0.");
    _util.assert(dataFormat === "NWC", ()=>`Error in conv1d: got dataFormat of ${dataFormat} but only NWC is currently supported.`);
    const filter4D = (0, _reshape.reshape)($filter, [
        1,
        $filter.shape[0],
        $filter.shape[1],
        $filter.shape[2]
    ]);
    const input4D = (0, _reshape.reshape)(x3D, [
        x3D.shape[0],
        1,
        x3D.shape[1],
        x3D.shape[2]
    ]);
    const strides = [
        1,
        stride
    ];
    const dilations = [
        1,
        dilation
    ];
    const conv2dDataFormat = "NHWC";
    const res = (0, _conv2D.conv2d)(input4D, filter4D, strides, pad, conv2dDataFormat, dilations, dimRoundingMode);
    if (reshapedTo3D) return (0, _reshape.reshape)(res, [
        res.shape[2],
        res.shape[3]
    ]);
    return (0, _reshape.reshape)(res, [
        res.shape[0],
        res.shape[2],
        res.shape[3]
    ]);
}
Computes a 1D convolution over the input x.

@param x The input tensor, of rank 3 or rank 2, of shape
    `[batch, width, inChannels]`. If rank 2, batch of 1 is assumed.
@param filter The filter, rank 3, of shape
    `[filterWidth, inDepth, outDepth]`.
@param stride The number of entries by which the filter is moved right at
    each step.
@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 dataFormat An optional string from "NWC", "NCW". Defaults to "NWC",
    the data is stored in the order of [batch, in_width, in_channels]. Only
    "NWC" is currently supported.
@param dilation The dilation rate in which we sample input values in
    atrous convolution. Defaults to `1`. If it is greater than 1, then
    stride must be `1`.
@param dimRoundingMode A string from: 'ceil', 'round', 'floor'. If none is
    provided, it will default to truncate.

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