function batchNorm4d_(x, mean, variance, offset, scale, varianceEpsilon) {
    const $x = (0, _tensorUtilEnv.convertToTensor)(x, "x", "batchNorm");
    const $mean = (0, _tensorUtilEnv.convertToTensor)(mean, "mean", "batchNorm");
    const $variance = (0, _tensorUtilEnv.convertToTensor)(variance, "variance", "batchNorm");
    let $scale;
    if (scale != null) $scale = (0, _tensorUtilEnv.convertToTensor)(scale, "scale", "batchNorm");
    let $offset;
    if (offset != null) $offset = (0, _tensorUtilEnv.convertToTensor)(offset, "offset", "batchNorm");
    _util.assert($x.rank === 4, ()=>`Error in batchNorm4D: x must be rank 4 but got rank ` + `${$x.rank}.`);
    _util.assert($mean.rank === 4 || $mean.rank === 1, ()=>`Error in batchNorm4D: mean must be rank 4 or rank 1 but ` + `got rank ${$mean.rank}.`);
    _util.assert($variance.rank === 4 || $variance.rank === 1, ()=>`Error in batchNorm4D: variance must be rank 4 or rank 1 ` + `but got rank ${$variance.rank}.`);
    if ($scale != null) _util.assert($scale.rank === 4 || $scale.rank === 1, ()=>`Error in batchNorm4D: scale must be rank 4 or rank 1 ` + `but got rank ${$scale.rank}.`);
    if ($offset != null) _util.assert($offset.rank === 4 || $offset.rank === 1, ()=>`Error in batchNorm4D: offset must be rank 4 or rank 1 ` + `but got rank ${$offset.rank}.`);
    return (0, _batchnorm.batchNorm)($x, $mean, $variance, $offset, $scale, varianceEpsilon);
}
Batch normalization, strictly for 4D. For the more relaxed version, see
`tf.batchNorm`.

@param x The input Tensor.
@param mean A mean Tensor.
@param variance A variance Tensor.
@param offset An offset Tensor.
@param scale A scale Tensor.
@param varianceEpsilon A small float number to avoid dividing by 0.