pub enum TensorIndexer {
Select(usize),
Narrow(Bound<usize>, Bound<usize>),
IndexSelect(Tensor),
Err(Error),
}Expand description
Generic structure used to index a slice of the tensor
Variants§
Select(usize)
This selects the elements for which an index has some specific value.
Narrow(Bound<usize>, Bound<usize>)
This is a regular slice, purely indexing a chunk of the tensor
IndexSelect(Tensor)
Indexing via a 1d tensor
Err(Error)
Trait Implementations§
Source§impl Debug for TensorIndexer
impl Debug for TensorIndexer
Source§impl From<&[u32]> for TensorIndexer
impl From<&[u32]> for TensorIndexer
Source§impl From<&Tensor> for TensorIndexer
impl From<&Tensor> for TensorIndexer
Source§impl<T: RB> From<T> for TensorIndexer
impl<T: RB> From<T> for TensorIndexer
Auto Trait Implementations§
impl Freeze for TensorIndexer
impl !RefUnwindSafe for TensorIndexer
impl Send for TensorIndexer
impl Sync for TensorIndexer
impl Unpin for TensorIndexer
impl !UnwindSafe for TensorIndexer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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