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

Method reset

tfjs-core/src/engine.ts:1265–1281  ·  view source on GitHub ↗

* Resets the engine state. Removes all backends but does not remove * registered backend factories.

()

Source from the content-addressed store, hash-verified

1263 * registered backend factories.
1264 */
1265 reset(): void {
1266 // Make any pending promise obsolete.
1267 this.pendingBackendInitId++;
1268
1269 this.state.dispose();
1270 this.ENV.reset();
1271 this.state = new EngineState();
1272
1273 for (const backendName in this.registry) {
1274 this.disposeRegisteredKernels(backendName);
1275 this.registry[backendName].dispose();
1276 delete this.registry[backendName];
1277 }
1278 this.backendName = null;
1279 this.backendInstance = null;
1280 this.pendingBackendInit = null;
1281 }
1282}
1283
1284function ones(shape: number[]): Tensor {

Callers 7

flags_test.tsFile · 0.45
globals_test.tsFile · 0.45
executeTestsFunction · 0.45
engine_test.tsFile · 0.45

Calls 2

disposeMethod · 0.45

Tested by

no test coverage detected