(self, **solver_options)
return tf.assign(self.value_function.parameters[0], values)
Optimize the value function using cvx.

        Parameters
        ----------
        solver_options : kwargs, optional
            Additional solver options passes to cvxpy.Problem.solve.

        Returns
        -------
        assign_op : tf.Tensor
            An assign operation that updates the value function.
Optimize the value function using cvx.
Optimize the value function using cvx .
def optimize_value_function(self, **solver_options):
        """Optimize the value function using cvx.

        Parameters
        ----------
        solver_options : kwargs, optional
            Additional solver options passes to cvxpy.Problem.solve.

        Returns
        -------
        assign_op : tf.Tensor
            An assign operation that updates the value function.
        """
        if not isinstance(cvxpy, ModuleType):
            raise cvxpy

        actions = self.policy(self.state_space)
        next_states = self.dynamics(self.state_space, actions)

        # Only use the mean dynamics
        if isinstance(next_states, tuple):
            next_states, var = next_states

        rewards = self.reward_function(self.state_space,
                                       actions)

        values = self._run_cvx_optimization(next_states,
                                            rewards,
                                            **solver_options)

        return tf.assign(self.value_function.parameters[0], values)
def optimize_value_function ( self , * * solver_options ) : if not isinstance ( cvxpy , ModuleType ) : raise cvxpy actions = self . policy ( self . state_space ) next_states = self . dynamics ( self . state_space , actions ) # Only use the mean dynamics if isinstance ( next_states , tuple ) : next_states , var = next_states rewards = self . reward_function ( self . state_space , actions ) values = self . _run_cvx_optimization ( next_states , rewards , * * solver_options ) return tf . assign ( self . value_function . parameters [ 0 ] , values )