- nvidia.dali.fn.stack(*inputs, **kwargs)¶
Joins the input tensors along a new axis.
The shapes of respective tensors in the inputs must match.
- Supported backends
input0 (TensorList) – Input to the operator.
input[1..998] (TensorList, optional) – This function accepts up to 998 optional positional inputs
- Keyword Arguments:
axis (int, optional, default = 0) –
The axis in the output tensor along which the inputs are stacked.
The axis is inserted before a corresponding axis in the inputs. A value of 0 indicates that whole tensors are stacked. Specifying
axisequal to the number of dimensions in the inputs causes the values from the inputs to be interleaved).
Accepted range is [-ndim, ndim]. Negative indices are counted from the back.
axis_name (str, optional) –
Name of the new axis to be inserted.
A one-character string that will denote the new axis in the output layout. The output layout will be constructed by inserting that character into the input layout at the position indicated by
axis. For example, specifying
axis = 0and
axis_name = "C"with input layout “HW” will yield the output layout “CHW”
bytes_per_sample_hint (int or list of int, optional, default = ) –
Output size hint, in bytes per sample.
If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.
preserve (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.
seed (int, optional, default = -1) –
If not provided, it will be populated based on the global seed of the pipeline.