From ef5af87f60eca94743ec877080bf93b2773639cd Mon Sep 17 00:00:00 2001 From: mei1127 Date: Fri, 12 Jan 2024 17:07:49 +0800 Subject: [PATCH] revised l2pool2d_test.js --- test/l2pool2d_test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/l2pool2d_test.js b/test/l2pool2d_test.js index 0237af5..a8988bb 100644 --- a/test/l2pool2d_test.js +++ b/test/l2pool2d_test.js @@ -5,6 +5,14 @@ import {Tensor} from '../src/lib/tensor.js'; import * as utils from './utils.js'; describe('test pool2d', function() { + it('l2Pool2d default', function() { + const x = new Tensor([1, 1, 1, 1], [2]); + const windowDimensions = [1, 1]; + const y = l2Pool2d(x, {windowDimensions}); + utils.checkShape(y, [1, 1, 1, 1]); + utils.checkValue(y, [2]); + }); + it('l2Pool2d default', function() { const x = new Tensor([1, 1, 4, 4], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]); const windowDimensions = [3, 3];