chainer.functions.swapaxes

chainer.functions.swapaxes(x, axis1, axis2)[source]

Swap two axes of a variable.

Parameters:
  • x (Variable) – Input variable.
  • axis1 (int) – The first axis to swap.
  • axis2 (int) – The second axis to swap.
Returns:

Variable whose axes are swapped.

Return type:

Variable