pymoose.expand_dims
pymoose.expand_dims#
- pymoose.expand_dims(x, axis, placement=None)[source]#
Expand the rank of
xwith new singleton dimensions.- Parameters
x – The tensor to expand.
axis – Index of the new dimension. If a tuple/list, should contain the indices where each new dimension will be expanded.
placement – An optional
Placementto pin this operation to.
- Returns
The expanded tensor, complete with new singleton dimensions.