Loading TOC...

cntk:function-save

cntk:function-save(
   $function as cntk:function
) as document-node()

Summary

Serializes a cntk:function as a node.

Parameters
$function The input function.

Example

  xquery version "1.0-ml";

  let $num-classes := 2
  let $num-samples := 5
  let $input-shape := cntk:shape((64,28,3))
  let $input-variable := cntk:input-variable($input-shape, "float")
  let $layer-option := map:map()=>
  map:with("output-shape",cntk:shape((4)))=>
  map:with("input-rank", 1)=>
  map:with("activation", "identity")=>
  map:with("bias-init", 2)=>
  map:with("bias", fn:true())

  let $convolved-variable := cntk:dense-layer($input-variable, $layer-option)
  let $dense-option := map:map()=>
                      map:with("output-shape", cntk:shape(($num-classes))) =>
                      map:with("name", "saved-function")
  let $dense-output := cntk:dense-layer($convolved-variable, $dense-option)
  let $saved := cntk:function-save($dense-output)
  return cntk:function-name(cntk:function($saved))

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