Loading TOC...

cntk:as-composite

cntk:as-composite(
   $root-function as cntk:function,
   [$name as xs:string]
) as cntk:function

Summary

Creates a composite Function that has the specified rootFunction as its root. The composite denotes a higher-level Function encapsulating the entire graph of Functions underlying the specified rootFunction.

Parameters
$root-function Root Function, the graph underlying which, the newly created composite encapsulates.
$name The name of the function instance in the network.

Example

  let $input-variable1 := cntk:input-variable(cntk:shape((3)), "float",
    fn:false(), fn:false(), "feature")
  let $input-variable2 := cntk:input-variable(cntk:shape((3)), "float",
    fn:false(), fn:false(), "feature")
  return cntk:as-composite(cntk:element-and($input-variable1, $input-variable2), "r%")
  => cntk:function(Composite And (Input(Name(feature), Shape([3]),
  Dynamic Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)])), Input(Name(feature), Shape([3]), Dynamic Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)]))))

Example

  var inputVariable1 = cntk.inputVariable(cntk.shape([3]), "float",
    fn.false(), fn.false(), "feature")
  var inputVariable2 = cntk.inputVariable(cntk.shape([3]), "float",
    fn.false(), fn.false(), "feature")
  cntk.asComposite(cntk.elementAnd(inputVariable1, inputVariable2), "r%")
  => cntk.function(Composite And (Input(Name(feature), Shape([3]), Dynamic
  Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)])),
  Input(Name(feature), Shape([3]), Dynamic Axes([Sequence Axis(Default Dynamic
  Axis), Batch Axis(Default Batch Axis)]))))

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