Enum burn::tensor::TensorPrimitive
pub enum TensorPrimitive<B, const D: usize>where
B: Backend,{
Float(<B as Backend>::FloatTensorPrimitive<D>),
QFloat(<B as Backend>::QuantizedTensorPrimitive<D>),
}
Expand description
A primitive tensor representation.
Variants§
Float(<B as Backend>::FloatTensorPrimitive<D>)
Float tensor primitive.
QFloat(<B as Backend>::QuantizedTensorPrimitive<D>)
Quantized float tensor primitive.
Implementations§
§impl<B, const D: usize> TensorPrimitive<B, D>where
B: Backend,
impl<B, const D: usize> TensorPrimitive<B, D>where
B: Backend,
pub fn tensor(self) -> <B as Backend>::FloatTensorPrimitive<D>
pub fn tensor(self) -> <B as Backend>::FloatTensorPrimitive<D>
Returns the full tensor representation.
Trait Implementations§
§impl<B, const D: usize> Clone for TensorPrimitive<B, D>where
B: Clone + Backend,
<B as Backend>::FloatTensorPrimitive<D>: Clone,
<B as Backend>::QuantizedTensorPrimitive<D>: Clone,
impl<B, const D: usize> Clone for TensorPrimitive<B, D>where
B: Clone + Backend,
<B as Backend>::FloatTensorPrimitive<D>: Clone,
<B as Backend>::QuantizedTensorPrimitive<D>: Clone,
§fn clone(&self) -> TensorPrimitive<B, D>
fn clone(&self) -> TensorPrimitive<B, D>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<B, const D: usize> Freeze for TensorPrimitive<B, D>where
<B as Backend>::FloatTensorPrimitive<D>: Freeze,
<B as Backend>::QuantizedTensorPrimitive<D>: Freeze,
impl<B, const D: usize> RefUnwindSafe for TensorPrimitive<B, D>where
<B as Backend>::FloatTensorPrimitive<D>: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive<D>: RefUnwindSafe,
impl<B, const D: usize> Send for TensorPrimitive<B, D>
impl<B, const D: usize> Sync for TensorPrimitive<B, D>where
<B as Backend>::FloatTensorPrimitive<D>: Sync,
<B as Backend>::QuantizedTensorPrimitive<D>: Sync,
impl<B, const D: usize> Unpin for TensorPrimitive<B, D>where
<B as Backend>::FloatTensorPrimitive<D>: Unpin,
<B as Backend>::QuantizedTensorPrimitive<D>: Unpin,
impl<B, const D: usize> UnwindSafe for TensorPrimitive<B, D>where
<B as Backend>::FloatTensorPrimitive<D>: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive<D>: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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