From 86eb311164d6b936f36b412651962d13dd594344 Mon Sep 17 00:00:00 2001 From: BruceDai Date: Fri, 22 Mar 2024 15:56:24 +0800 Subject: [PATCH] Update input sizes to calculate padding for maxPool2d of TinyYolo nchw model (#201) --- object_detection/tiny_yolov2_nchw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object_detection/tiny_yolov2_nchw.js b/object_detection/tiny_yolov2_nchw.js index d8af67cb..eca6e4d2 100644 --- a/object_detection/tiny_yolov2_nchw.js +++ b/object_detection/tiny_yolov2_nchw.js @@ -38,7 +38,7 @@ export class TinyYoloV2Nchw { buildMaxPool2d_(input, options) { options.padding = computePadding2DForAutoPad( - /* nhwc */[input.shape()[1], input.shape()[2]], + /* nchw */[input.shape()[2], input.shape()[3]], options.windowDimensions, options.strides, options.dilations, 'same-upper'); return this.builder_.maxPool2d(input, options);