Loading TOC...

cntk:dropout-layer

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

Summary

Layer factory function to create a dropout layer.

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

"dropout-rate": xs:double.

"seed": xs:unsignedLong.

"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:dropout-layer($input-variable, 
  map:map()=>
  map:with("dropout-rate",(0.5))=>
  map:with("seed", 1)=>
  map:with("name", "new_name")
  )
  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.