'Returns the evaluated value of the optree as a Tensor.
Allocates new memory, usually used for debug.
Returns:
Tensor: evaluated value'

def astensor(self):

    stack = self.traverse(list())
    be = None
    for s in stack:
        if isinstance(s, Tensor):
            be = s.backend
            break
    if (be is None):
        raise ValueError('No    tensor    object    in    op_tree')
    buf = be.empty(self.shape)
    buf[:] = self
    return buf
