clearAndClose(keepIds) {
          this.tensors.forEach(tensor => {
              if (keepIds == null || !keepIds.has(tensor.id)) {
                  tensor.dispose();
              }
          });
          this.tensors.length = 0;
          this.idTensor.dispose();
      }
/**
       * Dispose the tensors and idTensor and clear the tensor list.
       */
Dispose the tensors and idTensor and clear the tensor list.
Dispose the tensors and idTensor and clear the tensor list .
clearAndClose(keepIds) {
          this.tensors.forEach(tensor => {
              if (keepIds == null || !keepIds.has(tensor.id)) {
                  tensor.dispose();
              }
          });
          this.tensors.length = 0;
          this.idTensor.dispose();
      }
clearAndClose ( keepIds ) { this . tensors . forEach ( tensor => { if ( keepIds == null || ! keepIds . has ( tensor . id ) ) { tensor . dispose ( ) ; } } ) ; this . tensors . length = 0 ; this . idTensor . dispose ( ) ; }
Dispose the tensors and idTensor and clear the tensor list.
Dispose the tensors and idTensor and clear the tensor list .