Enum burn_tensor::TensorPrimitive
source · pub enum TensorPrimitive<B: Backend, const D: usize> {
Float(B::FloatTensorPrimitive<D>),
QFloat(B::QuantizedTensorPrimitive<D>),
}
Expand description
A primitive tensor representation.
Variants§
Float(B::FloatTensorPrimitive<D>)
Float tensor primitive.
QFloat(B::QuantizedTensorPrimitive<D>)
Quantized float tensor primitive.
Implementations§
source§impl<B: Backend, const D: usize> TensorPrimitive<B, D>
impl<B: Backend, const D: usize> TensorPrimitive<B, D>
sourcepub fn tensor(self) -> B::FloatTensorPrimitive<D>
pub fn tensor(self) -> B::FloatTensorPrimitive<D>
Returns the full tensor representation.
Trait Implementations§
Auto 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)