Minimizes objective function of the model.

        :param model: GPflow model with objective tensor.
        :param session: Session where optimization will be run.
        :param var_list: List of extra variables which should be trained during optimization.
        :param feed_dict: Feed dictionary of tensors passed to session run method.
        :param maxiter: Number of run interation. Note: scipy optimizer can do early stopping
            if model converged.
        :param disp: ScipyOptimizer option. Set to True to print convergence messages.
        :param initialize: If `True` model parameters will be re-initialized even if they were
            initialized before for gotten session.
        :param anchor: If `True` trained parameters computed during optimization at
            particular session will be synchronized with internal parameter values.
        :param step_callback: A function to be called at each optimization step;
            arguments are the current values of all optimization variables
            flattened into a single vector.
        :type step_callback: Callable[[np.ndarray], None]
        :param kwargs: This is a dictionary of extra parameters for session run method.

def minimize(self, model, session=None, var_list=None, feed_dict=None, maxiter=1000,
                 disp=False, initialize=False, anchor=True, step_callback=None, **kwargs):
        """
        Minimizes objective function of the model.

        :param model: GPflow model with objective tensor.
        :param session: Session where optimization will be run.
        :param var_list: List of extra variables which should be trained during optimization.
        :param feed_dict: Feed dictionary of tensors passed to session run method.
        :param maxiter: Number of run interation. Note: scipy optimizer can do early stopping
            if model converged.
        :param disp: ScipyOptimizer option. Set to True to print convergence messages.
        :param initialize: If `True` model parameters will be re-initialized even if they were
            initialized before for gotten session.
        :param anchor: If `True` trained parameters computed during optimization at
            particular session will be synchronized with internal parameter values.
        :param step_callback: A function to be called at each optimization step;
            arguments are the current values of all optimization variables
            flattened into a single vector.
        :type step_callback: Callable[[np.ndarray], None]
        :param kwargs: This is a dictionary of extra parameters for session run method.
        """
        if model is None or not isinstance(model, Model):
            raise ValueError('Unknown type passed for optimization.')

        if model.is_built_coherence() is Build.NO:
            raise GPflowError('Model is not built.')

        session = model.enquire_session(session)
        self._model = model
        optimizer = self.make_optimize_tensor(model, session,
            var_list=var_list, maxiter=maxiter, disp=disp)
        self._optimizer = optimizer
        feed_dict = self._gen_feed_dict(model, feed_dict)
        optimizer.minimize(session=session, feed_dict=feed_dict, step_callback=step_callback,
                           **kwargs)
        if anchor:
            model.anchor(session)