Skip to content

Commit 80f4dc6

Browse files
committed
refactoring in computeOutputShape for image resizing layer
1 parent a54be74 commit 80f4dc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tfjs-layers/src/layers/preprocessing/image_resizing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export class Resizing extends Layer {
6868

6969
computeOutputShape(inputShape: Shape|Shape[]): Shape|Shape[] {
7070
inputShape = getExactlyOneShape(inputShape);
71-
const numChannels = inputShape.slice(inputShape.length - 1)[0];
71+
// inputShape.slice(inputShape.length - 1)[0];
72+
const numChannels = inputShape.slice()[2];
7273
const outputShape = [];
7374
outputShape.push(this.height);
7475
outputShape.push(this.width);

0 commit comments

Comments
 (0)