MCPcopy
hub / github.com/tensorflow/tfjs / f2

Function f2

tfjs-core/src/ops/operation.ts:48–61  ·  view source on GitHub ↗
(...args: any[])

Source from the content-addressed store, hash-verified

46
47 // tslint:disable-next-line:no-any
48 const f2 = (...args: any[]) => {
49 ENGINE.startScope(opName);
50 try {
51 const result = fn(...args);
52 if (isPromise(result)) {
53 console.error('Cannot return a Promise inside of tidy.');
54 }
55 ENGINE.endScope(result);
56 return result;
57 } catch (ex) {
58 ENGINE.endScope(null);
59 throw ex;
60 }
61 };
62 Object.defineProperty(f2, 'name', {value: opName, configurable: true});
63
64 // tslint:disable-next-line:no-any

Callers

nothing calls this directly

Calls 3

isPromiseFunction · 0.90
startScopeMethod · 0.80
endScopeMethod · 0.80

Tested by

no test coverage detected