Loading TOC...

cntk:momentum-schedule-from-pairs

cntk:momentum-schedule-from-pairs(
   $pairs as json:array,
   [$epoch-size as xs:unsignedLong],
   [$minibatch-size as xs:unsignedLong]
) as cntk:schedule

Summary

Returns a momentum schedule. Works exactly like the learning-rate couter-part.

Parameters
$pairs A sequence of pairs of "number of epochs" and "their momentum". An array of array, where each inner array has length 2, and with the first element being of type xs:unsignedLong and second being of type xs:double.
$epoch-size The epoch size. Defaults to a special sentinel value to represent the whole data sweep.
$minibatch-size The minibatch size. Defaults to a sentinel value which means ignored. This is a "best-effort" parameter: there is no guarantee that the size of every minibatch is exactly $minibatch-size.

Example

  xquery version "1.0-ml";

  let $pairs := json:to-array((
    json:to-array((100,0.01)),
    json:to-array((200,0.001)),
    json:to-array((150,0.002))
  ))
  let $rs := cntk:momentum-schedule-from-pairs($pairs)
  return fn:replace(xdmp:quote($rs), "0x[0-9A-Za-z]*", "TrainingParameterSchedule")
  => cntk:schedule(Data Type(double), Mini Batch Size(0), Sweep Based(true), Full Data Sweep(0), Current Version(2))

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