pub enum SplitArg {
Size(usize),
Sections(usize),
Indices(Vec<usize>),
}Expand description
Split argument specification for tensor splitting operations
§Variants
§Size
Split into chunks of specified size along the dimension. The last chunk may be smaller if the dimension size is not evenly divisible.
§Sections
Split into the specified number of approximately equal sections. If not evenly divisible, earlier sections will be one element larger.
§Indices
Split at the specified indices, creating len(indices)+1 sub-tensors. Indices must be sorted and within bounds of the dimension.
Variants§
Size(usize)
Split into chunks of fixed size
Sections(usize)
Split into specified number of sections
Indices(Vec<usize>)
Split at specified indices
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SplitArg
impl RefUnwindSafe for SplitArg
impl Send for SplitArg
impl Sync for SplitArg
impl Unpin for SplitArg
impl UnsafeUnpin for SplitArg
impl UnwindSafe for SplitArg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more