MCPcopy Index your code
hub / github.com/tensorflow/tfjs / scopedRun

Method scopedRun

tfjs-core/src/engine.ts:477–487  ·  view source on GitHub ↗
(start: () => void, end: () => void, f: () => T)

Source from the content-addressed store, hash-verified

475 }
476
477 private scopedRun<T>(start: () => void, end: () => void, f: () => T): T {
478 start();
479 try {
480 const res = f();
481 end();
482 return res;
483 } catch (ex) {
484 end();
485 throw ex;
486 }
487 }
488
489 private static nextTensorId = 0;
490 private nextTensorId(): number {

Callers 3

tidyMethod · 0.95
runKernelFuncMethod · 0.95
gradientsMethod · 0.95

Calls 2

startFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected