* Releases the memory used by the weight tensors and resourceManager. * * @doc {heading: 'Models', subheading: 'Classes'}
()
| 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 | /** |
no test coverage detected