Skip to content

Commit da2fb5e

Browse files
Fixed computing channel-last output shape
1 parent 67eda77 commit da2fb5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • js/web/lib/wasm/jsep/webgpu/ops

js/web/lib/wasm/jsep/webgpu/ops/pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const getAdjustedPoolAttributesAndOutputShape = <AttributeType extends AveragePo
4747
Object.assign(newAttributes, {kernelShape, strides, pads, cacheKey: attributes.cacheKey});
4848
}
4949
const outputShapeAsChannelLast = outputShapeAsChannelFirst.slice();
50-
outputShapeAsChannelLast.splice(1, 0, outputShapeAsChannelLast.pop()!);
50+
outputShapeAsChannelLast.push(outputShapeAsChannelLast.splice(1, 1)[0]);
5151
return [newAttributes, isChannelsLast ? outputShapeAsChannelLast : outputShapeAsChannelFirst];
5252
};
5353

0 commit comments

Comments
 (0)