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

Method dispose

tfjs-converter/src/executor/graph_model.ts:579–590  ·  view source on GitHub ↗

* Releases the memory used by the weight tensors and resourceManager. * * @doc {heading: 'Models', subheading: 'Classes'}

()

Source from the content-addressed store, hash-verified

577 * @doc {heading: 'Models', subheading: 'Classes'}
578 */
579 dispose() {
580 this.executor.dispose();
581
582 if (this.initializer) {
583 this.initializer.dispose();
584 if (this.resourceIdToCapturedInput) {
585 dispose(this.resourceIdToCapturedInput);
586 }
587 }
588
589 this.resourceManager.dispose();
590 }
591}
592
593/**

Callers 11

clearAndCloseMethod · 0.45
splitFunction · 0.45
clearAndCloseMethod · 0.45
clearAndCloseMethod · 0.45
importMethod · 0.45
executeOpFunction · 0.45
executeOpFunction · 0.45

Calls 1

disposeFunction · 0.90

Tested by

no test coverage detected