Loading TOC...

cntk:batch-normalization-layer

cntk:batch-normalization-layer(
   $operand as cntk:variable,
   $additional-parameters as map:map
) as cntk:function

Summary

Layer factory function to create a batch-normalization layer.

Parameters
$operand The operand of the operation.
$additional-parameters

"map-rank": xs:unsignedLong.

"init-scale": xs:double. Default: 1.0

"normalization-time-constant": xs:double. Default: 5000.0

"blend-time-constant": xs:double. Default: 0.0

"epsilon": xs:double. Default: 0.00001

"use-cntk-engine": xs:boolean. Default: false

"disable-regularization": xs:boolean. Default: false

"name": xs:string. Default: ""

Example

  xquery version "1.0-ml";
  let $shape := cntk:shape((3,3,10))
  let $input-variable := cntk:input-variable($shape, "float", fn:false(), fn:false(), "feature")
  let $model := cntk:batch-normalization-layer($input-variable, 
  map:map()=>
  map:with("map-rank",(1))=>
  map:with("init-scale",(1))=>
  map:with("normalization-time-constant",(5000))=>
  map:with("epsilon",(0.00001))=>
  map:with("use-cntk-engine",(fn:false()))=>
  map:with("disable-regularization",(fn:false()))
  )
  let $input-value := cntk:sequence($shape, json:to-array((1 to 90)),fn:true(), cntk:cpu(), "float")
  let $pair := json:to-array(($input-variable, $input-value))
  let $output-variable := cntk:function-output($model)
  let $output-value := cntk:evaluate($model, $pair, $output-variable, cntk:cpu())
  return (
  "Value Shape : ", xdmp:quote(cntk:value-shape($output-value)), "
", 
  "Value Device : ", xdmp:quote(cntk:value-device($output-value)), "
", 
  "Variable Owner : ", xdmp:quote(cntk:variable-owner($output-variable)), "
", 
  "Result Type : ", xdmp:type(cntk:value-to-array($output-variable, $output-value)))

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