function cropAndResize_(image, boxes, boxInd, cropSize, method, extrapolationValue) {
	  if (method === void 0) {
	    method = 'bilinear';
	  }

	  if (extrapolationValue === void 0) {
	    extrapolationValue = 0;
	  }

	  var $image = convertToTensor(image, 'image', 'cropAndResize');
	  var $boxes = convertToTensor(boxes, 'boxes', 'cropAndResize', 'float32');
	  var $boxInd = convertToTensor(boxInd, 'boxInd', 'cropAndResize', 'int32');
	  var numBoxes = $boxes.shape[0];
	  assert($image.rank === 4, function () {
	    return 'Error in cropAndResize: image must be rank 4,' + ("but got rank " + $image.rank + ".");
	  });
	  assert($boxes.rank === 2 && $boxes.shape[1] === 4, function () {
	    return "Error in cropAndResize: boxes must be have size [" + numBoxes + ",4] " + ("but had shape " + $boxes.shape + ".");
	  });
	  assert($boxInd.rank === 1 && $boxInd.shape[0] === numBoxes, function () {
	    return "Error in cropAndResize: boxInd must be have size [" + numBoxes + "] " + ("but had shape " + $boxes.shape + ".");
	  });
	  assert(cropSize.length === 2, function () {
	    return "Error in cropAndResize: cropSize must be of length 2, but got " + ("length " + cropSize.length + ".");
	  });
	  assert(cropSize[0] >= 1 && cropSize[1] >= 1, function () {
	    return "cropSize must be atleast [1,1], but was " + cropSize;
	  });
	  assert(method === 'bilinear' || method === 'nearest', function () {
	    return "method must be bilinear or nearest, but was " + method;
	  });
	  var inputs = {
	    image: $image,
	    boxes: $boxes,
	    boxInd: $boxInd
	  };
	  var attrs = {
	    method: method,
	    extrapolationValue: extrapolationValue,
	    cropSize: cropSize
	  };
	  var res = ENGINE.runKernel(CropAndResize, inputs, attrs);
	  return res;
	}
Extracts crops from the input image tensor and resizes them using bilinear
sampling or nearest neighbor sampling (possibly with aspect ratio change)
to a common output size specified by cropSize.

@param image 4d tensor of shape `[batch,imageHeight,imageWidth, depth]`,
    where imageHeight and imageWidth must be positive, specifying the
    batch of images from which to take crops
@param boxes 2d float32 tensor of shape `[numBoxes, 4]`. Each entry is
    `[y1, x1, y2, x2]`, where `(y1, x1)` and `(y2, x2)` are the normalized
    coordinates of the box in the boxInd[i]'th image in the batch
@param boxInd 1d int32 tensor of shape `[numBoxes]` with values in range
    `[0, batch)` that specifies the image that the `i`-th box refers to.
@param cropSize 1d int32 tensor of 2 elements `[cropHeigh, cropWidth]`
    specifying the size to which all crops are resized to.
@param method Optional string from `'bilinear' | 'nearest'`,
    defaults to bilinear, which specifies the sampling method for resizing
@param extrapolationValue A threshold for deciding when to remove boxes based
    on score. Defaults to 0.
@return A 4D tensor of the shape `[numBoxes,cropHeight,cropWidth,depth]`

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