Loading TOC...

cntk.sequenceGatherWithFactor

cntk.sequenceGatherWithFactor(
   $operand as cntk.variable,
   $condition as cntk.variable,
   $factor as Array,
   $name as 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
$factor
$name The name of the function instance in the network.

Example

  var inputVariable1 = cntk.inputVariable(cntk.shape([1]), "float", fn.false(),
    fn.false(), "feature")
  var inputVariable2 = cntk.inputVariable(cntk.shape([2]), "float", fn.false(),
    fn.false(), "feature")
  cntk.sequenceGatherWithFactor(inputVariable2, inputVariable1, [1,2])
  => 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.