Loading TOC...

cntk:flatten-on-axis

cntk:flatten-on-axis(
   $operand as cntk:variable,
   $name as xs:string
) as cntk:function

Summary

Create an instance of a flatten operation that reshape the specified tensor into 2D tensor. If input tensor has shape (d_0, d_1, ... d_n) then the output will have shape (d_0 X d_1 ... d_(axis-1), d_axis X d_(axis+1) ... X dn).

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

Example

  let $input-variable1 := cntk:input-variable(cntk:shape((2,3)), "float",
    fn:false(), fn:false(), "feature")
  return cntk:flatten-on-axis($input-variable1,cntk:axis(1))
  => cntk:function(Composite Flatten (Input(Name(feature), Shape([2 x 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.