Skip to content

Commit

Permalink
revised l2pool2d_test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mei1127 committed Jan 12, 2024
1 parent 46ce01c commit ef5af87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/l2pool2d_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit ef5af87

Please sign in to comment.