Skip to content

Commit bd0cc7e

Browse files
committed
Modularize mean.
1 parent 3bbd85d commit bd0cc7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tfjs-core/src/ops/mean.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ function mean_<T extends Tensor>(
6666

6767
const inputs: MeanInputs = {x: $x};
6868
const attrs: MeanAttrs = {axis, keepDims};
69-
const forward: ForwardFunc<Tensor> = () => {
69+
const forward: ForwardFunc<Tensor> = (backend, save) => {
70+
save([$x]);
7071
const axes = parseAxisParam(axis, $x.shape);
7172
const shapes = computeOutAndReduceShapes($x.shape, axes);
7273
const reduceShape = shapes[1];

0 commit comments

Comments
 (0)