function resizeBilinear_(images, size, alignCorners = false, halfPixelCenters = false) {
    const $images = (0, _tensorUtilEnv.convertToTensor)(images, "images", "resizeBilinear");
    _util.assert($images.rank === 3 || $images.rank === 4, ()=>`Error in resizeBilinear: x must be rank 3 or 4, but got ` + `rank ${$images.rank}.`);
    _util.assert(size.length === 2, ()=>`Error in resizeBilinear: new shape must 2D, but got shape ` + `${size}.`);
    _util.assert(halfPixelCenters === false || alignCorners === false, ()=>`Error in resizeBilinear: If halfPixelCenters is true, ` + `alignCorners must be false.`);
    let batchImages = $images;
    let reshapedTo4D = false;
    if ($images.rank === 3) {
        reshapedTo4D = true;
        batchImages = (0, _reshape.reshape)($images, [
            1,
            $images.shape[0],
            $images.shape[1],
            $images.shape[2]
        ]);
    }
    const [] = size;
    const inputs = {
        images: batchImages
    };
    const attrs = {
        alignCorners,
        halfPixelCenters,
        size
    };
    // tslint:disable-next-line: no-unnecessary-type-assertion
    const res = (0, _engine.ENGINE).runKernel((0, _kernelNames.ResizeBilinear), inputs, attrs);
    if (reshapedTo4D) return (0, _reshape.reshape)(res, [
        res.shape[1],
        res.shape[2],
        res.shape[3]
    ]);
    return res;
}
Bilinear resize a single 3D image or a batch of 3D images to a new shape.

@param images The images, of rank 4 or rank 3, of shape
    `[batch, height, width, inChannels]`. If rank 3, batch of 1 is assumed.
@param size The new shape `[newHeight, newWidth]` to resize the
    images to. Each channel is resized individually.
@param alignCorners Defaults to `false`. If true, rescale
    input by `(new_height - 1) / (height - 1)`, which exactly aligns the 4
    corners of images and resized images. If false, rescale by
    `new_height / height`. Treat similarly the width dimension.
@param halfPixelCenters Defaults to `false`. Whether to assume pixel centers
    are at 0.5, which would make the floating point coordinates of the top
    left pixel 0.5, 0.5.

@doc {heading: 'Operations', subheading: 'Images', namespace: 'image'}