[mlpack-git] [mlpack/mlpack] parallel sgd (#603)

Ryan Curtin notifications at github.com
Tue Apr 26 09:36:59 EDT 2016


> +      {
> +        continue;
> +      }
> +
> +
> +      #pragma omp critical 
> +      {
> +        sumIterate += tIterate[th_num];
> +      }
> +    
> +      //wait untill all thread update sumIterate
> +      #pragma omp barrier   
> +
> +
> +      //runing  a single thread for tollerence checking
> +      #pragma omp master

I thought that the tolerance checking was done for each algorithm individually.  As in, all you would need to do for this algorithm would be something like:

```
#pragma omp parallel
{
  SGD sgd(...);
  sgd.Optimize(...);
}

// Then combine results.
```

I think that this could be a lot simpler still.  Since we already have the `SGD` class, why not use it? :)  Let me know if I've misunderstood something.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/603/files/a06e94df0ba373ab7661d2e2785aa57c94dc3b49#r61085875
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160426/ca14ec95/attachment.html>


More information about the mlpack-git mailing list