Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/optim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cg.lua
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2011-11-03 20:01:33 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-11-03 20:01:33 +0400
commitba1658fe670106e5ee1d158be73ae5162788e215 (patch)
treec2b1ebf40301a40ea492c6b48977767d55328d0f /cg.lua
parent1251becbaf00227c45c5ba762f79fb92f92a3970 (diff)
Added first SGD, and orgniazed package.
Diffstat (limited to 'cg.lua')
-rw-r--r--cg.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/cg.lua b/cg.lua
index 136fe83..c769a37 100644
--- a/cg.lua
+++ b/cg.lua
@@ -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 = {}