diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2011-11-03 20:01:33 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2011-11-03 20:01:33 +0400 |
commit | ba1658fe670106e5ee1d158be73ae5162788e215 (patch) | |
tree | c2b1ebf40301a40ea492c6b48977767d55328d0f /cg.lua | |
parent | 1251becbaf00227c45c5ba762f79fb92f92a3970 (diff) |
Added first SGD, and orgniazed package.
Diffstat (limited to 'cg.lua')
-rw-r--r-- | cg.lua | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,15 +1,17 @@ +---------------------------------------------------------------------- -- This cg implementation is a rewrite of minimize.m written by Carl -- E. Rasmussen. It is supposed to produce exactly same results (give -- or take numerical accuracy due to some changed order of -- operations). - +-- -- opfunc is a function that takes a single input, the point of evaluation. -- x is the initial point -- params is a table of parameters and temporary allocations. -- params.longth : max number of function evaluations -- params.df[0,1,2,3] : if you pass torch.Tensor they will be used for temp storage -- params.[s,x0] : if you pass torch.Tensor they will be used for temp storage -function cg(opfunc, x, params) +-- +function optim.cg(opfunc, x, params) -- parameters local params = params or {} @@ -24,7 +26,6 @@ function cg(opfunc, x, params) local verbose = params.verbose or 0 - local i = 0 local ls_failed = 0 local fx = {} |