Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit 8a6a070

Browse files
committed
Format
1 parent 3c6f143 commit 8a6a070

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/ops/pool.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ function avgPool3d_(
532532
dimRoundingMode?: 'floor'|'round'|'ceil',
533533
dataFormat: 'NDHWC'|'NCDHW' = 'NDHWC'): Tensor5D {
534534
const $x = convertToTensor(x, 'x', 'avgPool3d', 'float32');
535-
535+
536536
if (dilations == null) {
537537
dilations = [1, 1, 1];
538538
}
@@ -553,22 +553,22 @@ function avgPool3d_(
553553
() => `Error in avgPool3d: pad must be an integer when using, ` +
554554
`dimRoundingMode ${dimRoundingMode} but got pad ${pad}.`);
555555
}
556-
556+
557557
const convInfo = conv_util.computePool3DInfo(
558558
$x.shape, filterSize, strides, dilations, pad, dimRoundingMode,
559559
dataFormat);
560-
560+
561561
const grad = (dy: Tensor5D) => {
562562
return {
563563
x: () => avgPool3dBackprop(
564564
dy, $x, filterSize, strides, dilations, pad, dimRoundingMode)
565565
};
566566
};
567-
567+
568568
let res = ENGINE.runKernel(
569569
backend => backend.avgPool3d($x, convInfo), {x: $x}, grad);
570570
res = res.cast($x.dtype);
571-
571+
572572
return res;
573573
}
574574

@@ -691,7 +691,7 @@ function maxPool3d_(
691691
dimRoundingMode?: 'floor'|'round'|'ceil',
692692
dataFormat: 'NDHWC'|'NCDHW' = 'NDHWC'): Tensor5D {
693693
const $x = convertToTensor(x, 'x', 'maxPool3d');
694-
694+
695695
if (dilations == null) {
696696
dilations = [1, 1, 1];
697697
}
@@ -712,11 +712,11 @@ function maxPool3d_(
712712
() => `Error in maxPool3d: pad must be an integer when using, ` +
713713
`dimRoundingMode ${dimRoundingMode} but got pad ${pad}.`);
714714
}
715-
715+
716716
const convInfo = conv_util.computePool3DInfo(
717717
$x.shape, filterSize, strides, dilations, pad, dimRoundingMode,
718718
dataFormat);
719-
719+
720720
const grad = (dy: Tensor5D, saved: Tensor[]) => {
721721
const [$x, y] = saved;
722722
return {
@@ -725,13 +725,13 @@ function maxPool3d_(
725725
pad, dimRoundingMode)
726726
};
727727
};
728-
728+
729729
const res = ENGINE.runKernel((backend, save) => {
730730
const y = backend.maxPool3d($x, convInfo);
731731
save([$x, y]);
732732
return y;
733733
}, {x: $x}, grad);
734-
734+
735735
return res;
736736
}
737737

0 commit comments

Comments
 (0)