Loading TOC...

cntk:layer-normalization-layer

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

Summary

Layer factory function to create a layer-normalization layer.

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

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

"init-bias": xs:double. Default: 0.0

"epsilon": xs:double. Default: 0.00001

"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:layer-normalization-layer($input-variable, 
map:map()=>
map:with("init-scale",(0.5))=>
map:with("init-bias",(0.3))=>
map:with("epsilon",(0.02))
)
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.