MCPcopy Create free account
hub / github.com/tensorflow/tfjs / factory

Function factory

tfjs-core/src/engine_test.ts:61–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 it('removeBackend disposes the backend and removes the factory', () => {
60 let backend: KernelBackend;
61 const factory = () => {
62 const newBackend = new TestKernelBackend();
63 if (backend == null) {
64 backend = newBackend;
65 spyOn(backend, 'dispose').and.callThrough();
66 }
67 return newBackend;
68 };
69
70 registerBackend('test-backend', factory);
71

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…