<p>In <a href="https://github.com/mlpack/mlpack/pull/603#discussion_r60637451">src/mlpack/core/optimizers/parallel_sgd/sgdp_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -39,28 +39,38 @@ double ParallelSGD&lt;DecomposableFunctionType&gt;::Optimize(arma::mat&amp; iterate)
&gt;    double lastObjective = DBL_MAX;
&gt;  
&gt;    //get maximum number of threads that will be running. with is defined by OMP_NUM_THREADS
&gt; -  int num_thread=omp_get_max_threads();
&gt; +  size_t num_thread=omp_get_max_threads();
&gt; +
&gt; +  //T: after T iteration it will go for tollerence checking;  we can define T in many way
&gt; +  //size_t T=maxIterations/num_thread;
&gt; +  //Here I have thaken T=contant
&gt; +  size_t T=1000;
</pre>
<p>T can be a function of number of Thread , maxIterations, current  Iteration value . Here I have taken Constant.  If T=1. It will check tolerance each time which will slow down the algorithm.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/603/files/39c317571e2014f017d648ae72f586c8b0148069..2378633258a12fc751a0265ec13df2824bacb121#r60637451">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMKEdGW_nRIZZOxO4dCLNXLpjUI-ks5p58nagaJpZM4H_54U.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/603/files/39c317571e2014f017d648ae72f586c8b0148069..2378633258a12fc751a0265ec13df2824bacb121#r60637451"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>