diff --git a/tfjs-backend-cpu/src/kernels/CropAndResize.ts b/tfjs-backend-cpu/src/kernels/CropAndResize.ts index 6757d2aa87..9c6256f06d 100644 --- a/tfjs-backend-cpu/src/kernels/CropAndResize.ts +++ b/tfjs-backend-cpu/src/kernels/CropAndResize.ts @@ -32,7 +32,7 @@ class ImageScaler { this.t2 = t2; this.t1 = t1; this.imageLength = imageLength; - this.cropLength = cropLength + this.cropLength = cropLength; } scaling(x: number): number { @@ -85,8 +85,8 @@ export function cropAndResize(args: { continue; } - const heightScaler = new ImageScaler(y2, y1, imageHeight, cropHeight) - const widthScaler = new ImageScaler(x2, x1, imageWidth, cropWidth) + const heightScaler = new ImageScaler(y2, y1, imageHeight, cropHeight); + const widthScaler = new ImageScaler(x2, x1, imageWidth, cropWidth); for (let y = 0; y < cropHeight; y++) { const yInd: number = (cropHeight > 1) ? diff --git a/tfjs-core/src/ops/image/crop_and_resize_test.ts b/tfjs-core/src/ops/image/crop_and_resize_test.ts index 1a4c7d5497..910f3b67d2 100644 --- a/tfjs-core/src/ops/image/crop_and_resize_test.ts +++ b/tfjs-core/src/ops/image/crop_and_resize_test.ts @@ -33,7 +33,7 @@ describeWithFlags('cropAndResize', ALL_ENVS, () => { }); it('halving-nearest', async () => { - const baseSize = 28 + const baseSize = 28; const image: tf.Tensor4D = tf.ones([1, 2 * baseSize, 1, 1]); const boxes: tf.Tensor2D = tf.tensor2d([0, 0, 1, 1], [1, 4]); const boxInd: tf.Tensor1D = tf.tensor1d([0], 'int32');