(self, optree)
return stacks[-1][0]
Execute the optree.

        Arguments:
            optree: (OpTreeNode): the OpTreeNode object that represents all
                                  the operations
Execute the optree.
Execute the optree .
def execute(self, optree):
        """
        Execute the optree.

        Arguments:
            optree: (OpTreeNode): the OpTreeNode object that represents all
                                  the operations
        """
        from neon.backends.float_ew import call_compound_kernel

        # get post order stack
        stack = optree.traverse(list())

        # bypass stage creation
        if self._is_simple_stack(stack):
            return call_compound_kernel(self._get_rand_state_dev(), self.compute_capability, *stack)

        # create stages and evaluate
        stacks = self._split_to_stacks(optree)

        for stack in stacks:
            if (len(stack) == 5 and isinstance(stack[3], dict) and
                    stack[3]['op'] == 'dot'):
                # evaluate the simple dot
                self.compound_dot(stack[1], stack[2], stack[0])
            else:
                call_compound_kernel(self._get_rand_state_dev(), self.compute_capability, *stack)

        return stacks[-1][0]
def execute ( self , optree ) : from neon . backends . float_ew import call_compound_kernel # get post order stack stack = optree . traverse ( list ( ) ) # bypass stage creation if self . _is_simple_stack ( stack ) : return call_compound_kernel ( self . _get_rand_state_dev ( ) , self . compute_capability , * stack ) # create stages and evaluate stacks = self . _split_to_stacks ( optree ) for stack in stacks : if ( len ( stack ) == 5 and isinstance ( stack [ 3 ] , dict ) and stack [ 3 ] [ 'op' ] == 'dot' ) : # evaluate the simple dot self . compound_dot ( stack [ 1 ] , stack [ 2 ] , stack [ 0 ] ) else : call_compound_kernel ( self . _get_rand_state_dev ( ) , self . compute_capability , * stack ) return stacks [ - 1 ] [ 0 ]