This document is relevant for: Trn1, Trn2, Trn3
nki.language.expand_dims#
- nki.language.expand_dims(x, axis)[source]#
Expand the shape of a tile.
((Similar to numpy.expand_dims))
Warning
This API is experimental and may change in future releases.
Insert a new axis that will appear at the axis position in the expanded tile shape.
- Parameters:
x – a tile.
axis – position in the expanded axes where the new axis is placed.
- Returns:
a tile with view of input data with the number of dimensions increased.
This document is relevant for: Trn1, Trn2, Trn3