Slice¶
- class
dragon.vm.dali.ops.
Slice
(
axes=(1, 0),
normalized_anchor=True,
normalized_shape=True,
**kwargs
)[source]¶ Select an interval of elements from input.
Examples:
slice = dali.ops.Slice( # Axis of intervals axes=[1, 0], # Whether the begin of interval is normalized # in a range of [0.0, 1.0] normalized_anchor=True, # Whether the size of interval is normalized # in a range of [0.0, 1.0] normalized_shape=True, ) y = slice(inputs['x'], crop_begin, crop_size)
__new__¶
- static
Slice.
__new__
(
cls,
axes=(1, 0),
normalized_anchor=True,
normalized_shape=True,
**kwargs
)[source]¶ Create a
Slice
operator.- Parameters:
- axes (Sequence[int], optional) – The axis to select.
- normalized_anchor (bool, optional, default=True) – Whether the begin of interval is normalized.
- normalized_shape (bool, optional, default=True) – Whether the size of interval is normalized.
- Returns:
nvidia.dali.ops.Slice – The operator.