* Disposes `tf.Tensor` from memory. * * @doc {heading: 'Tensors', subheading: 'Classes'}
()
| 441 | * @doc {heading: 'Tensors', subheading: 'Classes'} |
| 442 | */ |
| 443 | dispose(): void { |
| 444 | if (this.isDisposed) { |
| 445 | return; |
| 446 | } |
| 447 | if (this.kerasMask) { |
| 448 | this.kerasMask.dispose(); |
| 449 | } |
| 450 | trackerFn().disposeTensor(this); |
| 451 | this.isDisposedInternal = true; |
| 452 | } |
| 453 | |
| 454 | protected isDisposedInternal = false; |
| 455 | get isDisposed(): boolean { |
no test coverage detected