chainerx.swapaxes

chainerx.swapaxes(a, axis1, axis2)

Interchange two axes of an array.

Parameters
  • a (ndarray) – Array to swapaxes.

  • axis1 (int) – First Axis

  • axis2 (int) – Second Axis

Returns

Swaped array.

Return type

ndarray

Note

  • Output array is a view of the input array.

  • During backpropagation, this function propagates the gradients of the output arrays to the input array a.

See also

numpy.swapaxes()