'Compute gradients with ``self.get_optimizer()`` on ``self.get_cost()``.
Returns:
cost (tf.Tensor): the cost tensor returned by ``self.get_cost()``.
grads (list[tuple]): list of (grad, variable) tuple.'

def get_cost_and_grad(self):

    return self._get_cost_and_grad()
