Class SliceOption
Defined in File transforms.h
Class Documentation
-
class SliceOption
SliceOption used in Slice TensorTransform.
Public Functions
-
inline explicit SliceOption(bool all)
- Parameters
all – [in] Slice the whole dimension
Example/* Slice all the data. */ SliceOption slice_option = SliceOption(True);
-
inline explicit SliceOption(const std::vector<dsize_t> &indices)
- Parameters
indices – [in] Slice these indices along the dimension. Negative indices are supported.
Example/* Slice the given dimensions. */ std::vector<int64_t> indices = {0, 3, 6, 7}; SliceOption slice_option = SliceOption(indices);
-
inline explicit SliceOption(const Slice &slice)
- Parameters
slice – [in] Slice the generated indices from the slice object along the dimension.
Example/* Slice dimension from 2 to 10 with step 2. */ SliceOption slice_option = SliceOption(Slice(0, 10, 2)); transforms::Slice slice_op = transforms::Slice({slice_option});
-
inline explicit SliceOption(bool all)