Loading TOC...

cntk:label-layer

cntk:label-layer(
   $operand as cntk:variable,
   $name as xs:string
) as cntk:function

Summary

Layer factory function to create a label layer.

Parameters
$operand The operand of the operation.
$name The name of the function instance in the network.

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:label-layer($input-variable,"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.