Function marian::swapAxes

Function Documentation

Expr marian::swapAxes(Expr x, int axis1, int axis2)

Swap two axes of an expression.

Swaps two axes of an expression via reshaping, if possible, or transpose.

Return

Expression with the axes axis1 and axis2 interchanged

See

reshape() and transpose()

Parameters
  • x: Expression to manipulate

  • axis1: Axis to be swapped

  • axis2: Axis to swap with