diff --git a/tfjs-layers/src/layers/preprocessing/image_resizing.ts b/tfjs-layers/src/layers/preprocessing/image_resizing.ts index 8d9ef9035b5..feacf5d2f6b 100644 --- a/tfjs-layers/src/layers/preprocessing/image_resizing.ts +++ b/tfjs-layers/src/layers/preprocessing/image_resizing.ts @@ -68,7 +68,8 @@ export class Resizing extends Layer { computeOutputShape(inputShape: Shape|Shape[]): Shape|Shape[] { inputShape = getExactlyOneShape(inputShape); - const numChannels = inputShape.slice(inputShape.length - 1)[0]; + // inputShape.slice(inputShape.length - 1)[0]; + const numChannels = inputShape.slice()[2]; const outputShape = []; outputShape.push(this.height); outputShape.push(this.width);