Skip to content
2 changes: 1 addition & 1 deletion tfjs-layers/src/layers/preprocessing/image_resizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export declare interface ResizingArgs extends LayerArgs {
height: number;
width: number;
interpolation?: InterpolationType; // default = 'bilinear';
cropToAspectRatio?: boolean; // default = false;
cropToAspectRatio?: boolean; // default = false;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tfjs-layers/src/layers/preprocessing/image_resizing_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {image, Rank, Tensor, tensor, zeros, range, reshape} from '@tensorflow/tf
// import {Shape} from '../../keras_format/common';
import {describeMathCPUAndGPU, expectTensorsClose} from '../../utils/test_utils';

import {Resizing} from './image_resizing';
import {Resizing, ResizingArgs} from './image_resizing';

describeMathCPUAndGPU('Resizing Layer', () => {
it('Check if output shape matches specifications', () => {
Expand Down Expand Up @@ -110,7 +110,7 @@ describeMathCPUAndGPU('Resizing Layer', () => {
const incorrectArgs = {height, width, interpolation};
const expectedError =
`Invalid interpolation parameter: ${interpolation} is not implemented`;
expect(() => new Resizing(incorrectArgs)).toThrowError(expectedError);
expect(() => new Resizing(incorrectArgs as ResizingArgs)).toThrowError(expectedError);
});

it('Config holds correct name', () => {
Expand Down