function maxPoolGrad_(dy, input, output, filterSize, strides, pad, dimRoundingMode) {
	  var $dy = convertToTensor(dy, 'dy', 'maxPoolGrad');
	  var $input = convertToTensor(input, 'input', 'maxPoolGrad');
	  var $output = convertToTensor(output, 'output', 'maxPoolGrad');
	  assert($input.rank === $dy.rank, function () {
	    return "Rank of input (" + $input.rank + ") does not match rank of dy " + ("(" + $dy.rank + ")");
	  });
	  assert($dy.rank === 4, function () {
	    return "Error in maxPoolGrad: dy must be rank 4 but got rank " + ($dy.rank + ".");
	  });
	  assert($input.rank === 4, function () {
	    return "Error in maxPoolGrad: input must be rank 4 but got rank " + ($input.rank + ".");
	  });

	  if (dimRoundingMode != null) {
	    assert(isInt(pad), function () {
	      return "Error in maxPoolGrad: pad must be an integer when using, " + ("dimRoundingMode " + dimRoundingMode + " but got pad " + pad + ".");
	    });
	  }

	  var inputs = {
	    dy: $dy,
	    input: $input,
	    output: $output
	  };
	  var attrs = {
	    filterSize: filterSize,
	    strides: strides,
	    pad: pad,
	    dimRoundingMode: dimRoundingMode
	  }; // tslint:disable-next-line: no-unnecessary-type-assertion

	  return ENGINE.runKernel(MaxPoolGrad, inputs, attrs);
	}
Computes the backprop of a 2D max pool.

@param dy The dy error, of rank 4 or rank 3 of shape
    [batchSize, height, width, channels]. If rank 3, batch of 1 is
assumed.
@param input The original input image, of rank 4, of shape
    [batchSize, height, width, channels].
@param output The original output image, of rank 4, of shape
    [batchSize, outHeight, outWidth, channels].
@param filterSize The filter size: `[filterHeight, filterWidth]`. If
    `filterSize` is a single number, then `filterHeight == filterWidth`.
@param strides The strides of the pooling: `[strideHeight, strideWidth]`. If
    `strides` is a single number, then `strideHeight == strideWidth`.
@param pad A string from: 'same', 'valid'. The type of padding algorithm
    used in the forward prop of the op.
@param dimRoundingMode A string from: 'ceil', 'round', 'floor'. If none is
    provided, it will default to truncate.