Loading TOC...

cntk:adam-learner

cntk:adam-learner(
   $parameters as cntk:parameter*,
   $lr as cntk:schedule,
   $momentum as cntk:schedule,
   [$unit-gain as xs:boolean],
   [$variance-momentum-schedule as cntk:schedule],
   [$epsilon as xs:double],
   [$adamax as xs:boolean],
   [$alo as map:map]
) as cntk:schedule

Summary

Constructs an Adam learner.

Parameters
$parameters
$lr Learning rate schedule.
$momentum Momentum schedule.
$unit-gain Unit gain.
$variance-momentum-schedule Variance momentum schedule.
$epsilon Epsilon.
$adamax Adamax.
$alo Additional learning options.

Example

  let $shape := (3, 3, 3)
  let $parameter1 := cntk:parameter(cntk:shape($shape), "float",
    cntk:glorot-normal-initializer(5.5), cntk:cpu(), "parameter1")
  let $parameter2 := cntk:parameter-from-value(cntk:value(cntk:shape($shape),
    json:to-array((1 to 27)), cntk:cpu(), "float", fn:false()), "parameter2")
  let $parameter3 := cntk:parameter-from-scalar(cntk:shape($shape), "float",
    5.5, cntk:cpu(), "parameter3")
  let $lr := cntk:learning-rate-schedule-from-constant(0.01, 100)
  let $momentum := cntk:momentum-schedule-from-constant(15.5, 50)
  let $learner := cntk:adam-learner(($parameter1, $parameter2, $parameter3),
    $lr, $momentum)
  return fn:replace(xdmp:quote($learner), "0x[0-9A-Za-z]*", "Learner")
  => cntk:learner(Name(cntk:learner))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.