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

Method memory

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

Source from the content-addressed store, hash-verified

957 }
958
959 memory(): MemoryInfo {
960 const info = this.backend.memory() as MemoryInfo;
961 info.numTensors = this.state.numTensors;
962 info.numDataBuffers = this.state.numDataBuffers;
963 info.numBytes = this.state.numBytes;
964 if (this.state.numStringTensors > 0) {
965 info.unreliable = true;
966 if (info.reasons == null) {
967 info.reasons = [];
968 }
969 info.reasons.push(
970 'Memory usage by string tensors is approximate ' +
971 '(2 bytes per character)');
972 }
973 return info;
974 }
975
976 async profile(query: () => (TensorContainer | Promise<TensorContainer>)):
977 Promise<ProfileInfo> {

Callers

nothing calls this directly

Calls 2

memoryMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected