(self)
Move all tensors from self.buffer_active to self.buffer
        the idea is to reuse those tensors for other optrees.
Move all tensors from self.buffer_active to self.buffer
        the idea is to reuse those tensors for other optrees.
Move all tensors from self . buffer_active to self . buffer the idea is to reuse those tensors for other optrees .
def _buf_free(self):
        """
        Move all tensors from self.buffer_active to self.buffer
        the idea is to reuse those tensors for other optrees.
        """
        for shape in self.buf_active:
            self.buf[shape].extend(self.buf_active[shape])
            self.buf_active[shape] = []
def _buf_free ( self ) : for shape in self . buf_active : self . buf [ shape ] . extend ( self . buf_active [ shape ] ) self . buf_active [ shape ] = [ ]