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

Method dispose

tfjs-converter/src/executor/graph_executor.ts:698–702  ·  view source on GitHub ↗

* Releases the memory used by the weight tensors.

()

Source from the content-addressed store, hash-verified

696 * Releases the memory used by the weight tensors.
697 */
698 dispose() {
699 Object.keys(this.weightMap)
700 .forEach(
701 key => this.weightMap[key].forEach(tensor => tensor.dispose()));
702 }
703
704 private checkInputShapeAndType(inputs: NamedTensorMap) {
705 Object.keys(inputs).forEach(name => {

Calls

no outgoing calls

Tested by

no test coverage detected