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

Method getSortedBackends

tfjs-core/src/engine.ts:397–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

395 }
396
397 private getSortedBackends(): string[] {
398 if (Object.keys(this.registryFactory).length === 0) {
399 throw new Error('No backend found in registry.');
400 }
401 return Object.keys(this.registryFactory).sort((a: string, b: string) => {
402 // Highest priority comes first.
403 return this.registryFactory[b].priority -
404 this.registryFactory[a].priority;
405 });
406 }
407
408 private initializeBackendsAndReturnBest():
409 {name: string, asyncInit: boolean} {

Callers 2

readyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected