Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Real optim state hidden because not passed in #175

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test to match new signature so build test passes
  • Loading branch information
Rene Schaub committed Aug 29, 2017
commit c9f299b96049fd95499c9f56c161518fee5e601b
6 changes: 3 additions & 3 deletions test/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1530,10 +1530,10 @@ local tests = {
end
end

local state = { learningRate = learningRate }
local config, state = { learningRate = learningRate }, { }
local loss3
for e=1, 5 do
local optimfn, states = autograd.optim.sgd(df, state, params3)
local optimfn, configs, states = autograd.optim.sgd(df, config, state, params3)
loss3 = 0
for i=1,nData do
local grads, loss = optimfn(xs:narrow(1, i, 1), ys:narrow(1, i, 1))
Expand Down Expand Up @@ -1583,7 +1583,7 @@ local tests = {
local g = autograd(f, {optimize = true})

-- FAILS FOR OTHER OPTIMIZERS AS WELL
local optimfn, states = autograd.optim.sgd(g, {learningRate=1e-2}, params)
local optimfn, configs, states = autograd.optim.sgd(g, {learningRate=1e-2}, {}, params)

for i=1,3 do
-- Get images in BHWD format, labels in one-hot format:
Expand Down