pub enum IntTensor {
U8(Tensor<u8>),
I32(Tensor<i32>),
U32(Tensor<u32>),
}Variants§
Implementations§
Source§impl IntTensor
impl IntTensor
pub fn id(&self) -> TensorId
pub fn shape(&self) -> &Shape
pub fn dtype(&self) -> DType
pub fn layout(&self) -> &Layout
pub fn dims(&self) -> &[usize]
pub fn dim<D: Dim>(&self, dim: D) -> Result<usize>
pub fn element_count(&self) -> usize
pub fn is_contiguous(&self) -> bool
pub fn rank(&self) -> usize
pub fn flatten_all(&self) -> Result<Self>
pub fn eq(&self, value: i32) -> Result<Tensor<bool>>
pub fn ne(&self, value: i32) -> Result<Tensor<bool>>
pub fn masked_fill(&self, mask: &Tensor<bool>, value: i32) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IntTensor
impl RefUnwindSafe for IntTensor
impl Send for IntTensor
impl Sync for IntTensor
impl Unpin for IntTensor
impl UnsafeUnpin for IntTensor
impl UnwindSafe for IntTensor
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