Supress prints while running manopt code

17 views
Skip to first unread message

sarvendranath R

unread,
Sep 14, 2020, 7:13:50 AM9/14/20
to Manopt
Is there a way to stop matlab printing following lines while using manopt


acc TR+   k:     1     num_inner:     1     f: -1.706935e+02   |grad|: 3.309916e+01   negative curvature
acc       k:     2     num_inner:     1     f: -3.238026e+02   |grad|: 3.329785e+01   exceeded trust region
acc       k:     3     num_inner:     1     f: -4.601921e+02   |grad|: 3.091377e+01   negative curvature
acc       k:     4     num_inner:     2     f: -5.415083e+02   |grad|: 2.270066e+01   negative curvature
acc       k:     5     num_inner:     3     f: -5.776793e+02   |grad|: 5.948848e+00   exceeded trust region
REJ TR-   k:     6     num_inner:     4     f: -5.776793e+02   |grad|: 5.948848e+00   negative curvature
acc TR+   k:     7     num_inner:     3     f: -5.817527e+02   |grad|: 3.167358e+00   exceeded trust region
REJ TR-   k:     8     num_inner:     2     f: -5.817527e+02   |grad|: 3.167358e+00   negative curvature
acc TR+   k:     9     num_inner:     2     f: -5.832578e+02   |grad|: 4.691661e+00   negative curvature
acc       k:    10     num_inner:     2     f: -5.860313e+02   |grad|: 5.239287e+00   negative curvature
acc TR+   k:    11     num_inner:     7     f: -5.883857e+02   |grad|: 1.280109e+00   exceeded trust region
acc       k:    12     num_inner:     8     f: -5.886056e+02   |grad|: 9.903856e-02   reached target residual-kappa (linear)
acc       k:    13     num_inner:     9     f: -5.886073e+02   |grad|: 5.344030e-03   reached target residual-theta (superlinear)
acc       k:    14     num_inner:    19     f: -5.886073e+02   |grad|: 2.270031e-05   reached target residual-theta (superlinear)
acc       k:    15     num_inner:    32     f: -5.886073e+02   |grad|: 2.517241e-10   reached target residual-theta (superlinear)
Gradient norm tolerance reached; options.tolgradnorm = 1e-06.

Nicolas Boumal

unread,
Sep 14, 2020, 8:24:03 AM9/14/20
to Manopt
Yes: all options are documents when you type, for example:

help trustregions

at the command Prompt. There, you can find the following information under "options":

    verbosity (2)
        Integer number used to tune the amount of output the algorithm
        generates during execution (mostly as text in the command window).
        The higher, the more output. 0 means silent. 3 and above includes a
        display of the options structure at the beginning of the execution.

So, create a structure called "options" (for example) as follows:

options.verbosity = 0;

Then, call trustregions with options as the third input. For example, like this:

trustregions(problem, [], options);

(Here, [] means you want a default (i.e., random) initial guess; you can also specify an initial guess there if you prefer.)

Best,
Nicolas


Reply all
Reply to author
Forward
0 new messages