Loading TOC...

cntk:subshape

cntk:subshape(
   $shape as cntk:shape,
   $begin-axis-id as xs:unsignedLong,
   $end-axis-id as xs:unsignedLong
) as cntk:shape

Summary

Constructs and returns a new cntk:shape object that is a subshape of $shape. Throw exception if supplied $begin-axis-id .or $end-axis-id is out of bound;

Parameters
$shape The input shape
$begin-axis-id The begin axis id of the subshape, index is 0 based.
$end-axis-id The end axis id of the subshape, index is 0 based.

Example

  cntk:subshape(cntk:shape((4,3,3,1,2)), 2, 4)
  => a cntk:shape representing [3 x 1]

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