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

Method refCount

tfjs-node/src/nodejs_kernel_backend.ts:257–263  ·  view source on GitHub ↗

Return refCount of a `TensorData`.

(dataId: DataId)

Source from the content-addressed store, hash-verified

255 }
256 /** Return refCount of a `TensorData`. */
257 refCount(dataId: DataId): number {
258 if (this.tensorMap.has(dataId)) {
259 const tensorData = this.tensorMap.get(dataId);
260 return tensorData.refCount;
261 }
262 return 0;
263 }
264
265 incRef(dataId: DataId) {
266 this.tensorMap.get(dataId).refCount++;

Callers

nothing calls this directly

Calls 2

hasMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected