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

Method get

tfjs-layers/src/utils/executor_utils.ts:28–36  ·  view source on GitHub ↗

* Get the entry for the key and mark it as used recently.

(key: string)

Source from the content-addressed store, hash-verified

26 * Get the entry for the key and mark it as used recently.
27 */
28 public get(key: string): T {
29 let entry: T;
30 if (this.cache.has(key)) {
31 entry = this.cache.get(key);
32 this.cache.delete(key);
33 this.cache.set(key, entry);
34 }
35 return entry;
36 }
37
38 /**
39 * Put the entry into the cache. If the key already existed, mark the key as

Callers 6

getUniqueTensorNameFunction · 0.45
losses_test.tsFile · 0.45
compileMethod · 0.45
handleMetricsMethod · 0.45
executeFunction · 0.45

Calls 3

hasMethod · 0.80
deleteMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected