nvidia.dali.experimental.dynamic.expand_dims#
- nvidia.dali.experimental.dynamic.expand_dims(
- data,
- /,
- *,
- batch_size=None,
- device=None,
- axes,
- new_axis_names=None,
Insert new dimension(s) with extent 1 to the data shape.
The new dimensions are inserted at the positions specified by
axes.If
new_axis_namesis provided, the new dimension names will be inserted in the data layout, at the positions specified byaxes. Ifnew_axis_namesis not provided, the output data layout will be empty.”This operator allows sequence inputs and supports volumetric data.
- Supported backends
‘cpu’
‘gpu’
- Parameters:
data¶ (Tensor/Batch) – Data to be expanded
- Keyword Arguments:
axes¶ (int or list of int) – Indices at which the new dimensions are inserted.
new_axis_names¶ (layout str, optional, default = ‘’) –
Names of the new dimensions in the data layout.
The length of
new_axis_namesmust match the length ofaxes. If argument isn’t be provided, the layout will be cleared.