'Get gradient values in type Tensor w.r.t the list of `tensors`. If a
tensor is not used, its gradient will be set to zero.
Arguments:
Tensors (list): List of Tensors to compute gradients on.
Returns
list: A list of Tensors, each of them is the gradent of the input
tensor.'

def get_grad_tensor(self, tensors):

    grad_op_trees = self.get_grad_op_tree(tensors)
    grad_vals = []
    for grad_op_tree in grad_op_trees:
        grad_val = self.be.empty(grad_op_tree.shape)
        grad_val[:] = grad_op_tree
        grad_vals.append(grad_val)
    return grad_vals
