function transform_(image, transforms, interpolation = "nearest", fillMode = "constant", fillValue = 0, outputShape) {
    const $image = (0, _tensorUtilEnv.convertToTensor)(image, "image", "transform", "float32");
    const $transforms = (0, _tensorUtilEnv.convertToTensor)(transforms, "transforms", "transform", "float32");
    _util.assert($image.rank === 4, ()=>"Error in transform: image must be rank 4," + `but got rank ${$image.rank}.`);
    _util.assert($transforms.rank === 2 && ($transforms.shape[0] === $image.shape[0] || $transforms.shape[0] === 1) && $transforms.shape[1] === 8, ()=>`Error in transform: Input transform should be batch x 8 or 1 x 8`);
    _util.assert(outputShape == null || outputShape.length === 2, ()=>"Error in transform: outputShape must be [height, width] or null, " + `but got ${outputShape}.`);
    const inputs = {
        image: $image,
        transforms: $transforms
    };
    const attrs = {
        interpolation,
        fillMode,
        fillValue,
        outputShape
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.Transform), inputs, attrs);
}
Applies the given transform(s) to the image(s).

@param image 4d tensor of shape `[batch, imageHeight, imageWidth, depth]`.
@param transforms Projective transform matrix/matrices. A tensor1d of length
    8 or tensor of size N x 8. If one row of transforms is [a0, a1, a2, b0,
    b1, b2, c0, c1], then it maps the output point (x, y) to a transformed
    input point (x', y') = ((a0 x + a1 y + a2) / k, (b0 x + b1 y + b2) / k),
    where k = c0 x + c1 y + 1. The transforms are inverted compared to the
    transform mapping input points to output points.
@param interpolation Interpolation mode.
    Supported values: 'nearest', 'bilinear'. Default to 'nearest'.
@param fillMode Points outside the boundaries of the input are filled
    according to the given mode, one of 'constant', 'reflect', 'wrap',
    'nearest'. Default to 'constant'.
    'reflect': (d c b a | a b c d | d c b a ) The input is extended by
    reflecting about the edge of the last pixel.
    'constant': (k k k k | a b c d | k k k k) The input is extended by
    filling all values beyond the edge with the same constant value k.
    'wrap': (a b c d | a b c d | a b c d) The input is extended by
    wrapping around to the opposite edge.
    'nearest': (a a a a | a b c d | d d d d) The input is extended by
    the nearest pixel.
@param fillValue A float represents the value to be filled outside the
    boundaries when fillMode is 'constant'.
@param Output dimension after the transform, [height, width]. If undefined,
    output is the same size as input image.

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