Struct burn_candle::PrecisionBridge
source · pub struct PrecisionBridge<E: FloatCandleElement> { /* private fields */ }Expand description
Handle precision conversion for the candle backend.
Trait Implementations§
source§impl<TElem, OElem, IntElem> BackendBridge<Candle<OElem, IntElem>> for PrecisionBridge<TElem>where
TElem: FloatCandleElement,
OElem: FloatCandleElement,
IntElem: IntCandleElement,
impl<TElem, OElem, IntElem> BackendBridge<Candle<OElem, IntElem>> for PrecisionBridge<TElem>where
TElem: FloatCandleElement,
OElem: FloatCandleElement,
IntElem: IntCandleElement,
source§fn into_target<const D: usize>(
tensor: FloatTensor<Candle<OElem, IntElem>, D>,
device: Option<Device<Self::Target>>
) -> FloatTensor<Self::Target, D>
fn into_target<const D: usize>( tensor: FloatTensor<Candle<OElem, IntElem>, D>, device: Option<Device<Self::Target>> ) -> FloatTensor<Self::Target, D>
Transfer the tensor to the target backend.
source§fn from_target<const D: usize>(
tensor: FloatTensor<Self::Target, D>,
device: Option<Device<Candle<OElem, IntElem>>>
) -> FloatTensor<Candle<OElem, IntElem>, D>
fn from_target<const D: usize>( tensor: FloatTensor<Self::Target, D>, device: Option<Device<Candle<OElem, IntElem>>> ) -> FloatTensor<Candle<OElem, IntElem>, D>
Transfer the tensor from the target backend.
Auto Trait Implementations§
impl<E> Freeze for PrecisionBridge<E>
impl<E> RefUnwindSafe for PrecisionBridge<E>where
E: RefUnwindSafe,
impl<E> Send for PrecisionBridge<E>
impl<E> Sync for PrecisionBridge<E>
impl<E> Unpin for PrecisionBridge<E>where
E: Unpin,
impl<E> UnwindSafe for PrecisionBridge<E>where
E: 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> 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