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

Method refCount

tfjs-backend-cpu/src/backend_cpu.ts:97–103  ·  view source on GitHub ↗

Return refCount of a `TensorData`.

(dataId: DataId)

Source from the content-addressed store, hash-verified

95
96 /** Return refCount of a `TensorData`. */
97 override refCount(dataId: DataId): number {
98 if (this.data.has(dataId)) {
99 const tensorData = this.data.get(dataId);
100 return tensorData.refCount;
101 }
102 return 0;
103 }
104
105 /** Increase refCount of a `TensorData`. */
106 override incRef(dataId: DataId): void {

Callers

nothing calls this directly

Calls 2

hasMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected