Loading TOC...

cntk:sequence-gather

cntk:sequence-gather(
   $operand as cntk:variable,
   $condition as cntk:variable,
   $name as xs:string
) as cntk:function

Summary

Takes two sequences of the same length and returns a new sequence whose elements are those elements of sequence whose corresponding element in condition is True, preserving the ordering of sequence.

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

Example

  let $input-variable1 := cntk:input-variable(cntk:shape((1)), "float",
    fn:false(), fn:false(), "feature")
  let $input-variable2 := cntk:input-variable(cntk:shape((2)), "float",
    fn:false(), fn:false(), "feature")
  return cntk:sequence-gather($input-variable2, $input-variable1)
  => cntk:function(Composite Sequence::Gather (Input(Name(feature), Shape([2]),
  Dynamic Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch
  Axis)])), Input(Name(feature), Shape([1]), 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.