GitHub user dbtsai opened a pull request:

    https://github.com/apache/incubator-spark/pull/633

    Initialized the regVal for first iteration in SGD optimizer

    In runMiniBatchSGD, the regVal (for 1st iter) should be initialized
    as sum of sqrt of weights if it's L2 update; for L1 update, the same logic 
is followed.
    
    It maybe not be important here for SGD since the updater doesn't take the 
loss
    as parameter to find the new weights. But it will give us the correct 
history of loss.
    However, for LBFGS optimizer we implemented, the correct loss with regVal 
is crucial to
    find the new weights.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/AlpineNow/incubator-spark 
dbtsai-smallRegValFix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-spark/pull/633.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #633
    
----
commit 9d2670330ebcde4240d97f0f51d7cfbc71509780
Author: DB Tsai <dbt...@dbtsai.com>
Date:   2014-02-22T10:59:00Z

    In runMiniBatchSGD, the regVal (for 1st iter) should be initialized
    as sum of sqrt of weights if it's L2 update; for L1 update, the same logic 
is followed.
    
    It maybe not be important here for SGD since the updater doesn't take the 
loss
    as parameter to find the new weights. But it will give us the correct 
history of loss.
    However, for LBFGS optimizer we implemented, the correct loss with regVal 
is crucial to
    find the new weights.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastruct...@apache.org or file a JIRA ticket with INFRA.
---

Reply via email to