':param loss: Symbolic expression for the loss function.
:param target: A parameterized object to optimize over. It should implement methods of the
:class:`rllab.core.paramerized.Parameterized` class.
:param leq_constraint: A constraint provided as a tuple (f, epsilon), of the form f(*inputs) <= epsilon.
:param inputs: A list of symbolic variables as inputs
:return: No return value.'

def update_opt(self, loss, target, inputs, extra_inputs=None, gradients=None, **kwargs):

    self._target = target
    if (gradients is None):
        gradients = theano.grad(loss, target.get_params(trainable=True), disconnected_inputs='ignore')
    updates = self._update_method(gradients, target.get_params(trainable=True))
    updates = OrderedDict([(k, v.astype(k.dtype)) for (k, v) in updates.items()])
    if (extra_inputs is None):
        extra_inputs = list()
    self._opt_fun = ext.lazydict(f_loss=(lambda : ext.compile_function((inputs + extra_inputs), loss)), f_opt=(lambda : ext.compile_function(inputs=(inputs + extra_inputs), outputs=loss, updates=updates)))
