chainerx.expand_dims

chainerx.expand_dims(a, axis)

Expand the shape of an array.

Parameters
  • a (ndarray) – Input Array.

  • axis (int) – Position in the expanded axes where the new axis is placed.

Returns

Output array.

Return type

ndarray

Note

  • Output array may or may not be a view of the input array.

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