function computeDilation2DInfo(inputShape, filterShape, strides, pad, dataFormat = "NHWC", dilations) {
    // `computerConv2DInfo` require filterShape to be in the dimension of:
    // `[filterHeight, filterWidth, depth, outDepth]`, dilation2d doesn't have
    // outDepth, it should have the same depth as the input.
    // Input shape: [batch, height, width, inChannels]
    const inputChannels = inputShape[3];
    const $filterShape = [
        ...filterShape,
        inputChannels
    ];
    const $dataFormat = convertConv2DDataFormat(dataFormat);
    return computeConv2DInfo(inputShape, $filterShape, strides, dilations, pad, null, null, $dataFormat);
}
Check validity of pad when using dimRoundingMode.
@param opDesc A string of op description
@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 dimRoundingMode A string from: 'ceil', 'round', 'floor'. If none is
    provided, it will default to truncate.
@throws unknown padding parameter