Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tfjs-backend-wasm/scripts/test-bundle-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ exec(

shell.cd(dirName);
shell.cd(wasmDirName);
exec(`yarn && ./scripts/build-ci.sh && yarn rollup -c`, {silent: false});
exec(
`yarn && yarn build-core && ./scripts/build-ci.sh && yarn rollup -c`,
{silent: false});

const masterMinBundleSize = getFileSizeBytes(bundleFilename);
const masterWasmSize = getFileSizeBytes(wasmFileName);
Expand Down
4 changes: 2 additions & 2 deletions tfjs-backend-wasm/src/kernels/all_kernels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import './Conv2D';
import './CropAndResize';
import './DepthwiseConv2dNative';
import './Div';
import './Exp';
import './FloorDiv';
import './FusedBatchNorm';
import './FusedConv2D';
Expand All @@ -42,13 +43,12 @@ import './Mul';
import './NonMaxSuppressionV3';
import './PadV2';
import './Prelu';
import './Reshape';
import './Relu';
import './Relu6';
import './Reshape';
import './ResizeBilinear';
import './Sigmoid';
import './Slice';
import './Square';
import './Sub';
import './Transpose';
import './Exp';
1 change: 1 addition & 0 deletions tfjs-backend-wasm/src/setup_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const TEST_FILTERS: TestFilter[] = [
{include: 'addN'},
{include: 'nonMaxSuppression'},
{include: 'argmax', excludes: ['gradient']},
{include: 'exp '},
];

const customInclude = (testName: string) => {
Expand Down
7 changes: 5 additions & 2 deletions tfjs-core/src/ops/unary_ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,16 @@ function exp_<T extends Tensor>(x: T|TensorLike): T {
const $x = convertToTensor(x, 'x', 'exp');

const bck = (dy: T, saved: Tensor[]) => {
return {$x: () => dy.mulStrict(saved[0] as T)};
return {x: () => dy.mulStrict(saved[0] as T)};
};
const attrs = {};
const inputsToSave: Tensor[] = [];
const outputsToSave = [true];
return ENGINE.runKernelFunc((backend, save) => {
const y = backend.exp($x);
save([y]);
return y;
}, {$x}, bck);
}, {x: $x}, bck, 'Exp', attrs, inputsToSave, outputsToSave);
}

/**
Expand Down