Struct burn_tch::PrecisionBridge
source · pub struct PrecisionBridge<E: TchElement> { /* private fields */ }Expand description
Handle precision conversion for the candle backend.
Trait Implementations§
source§impl<TElem, OElem> BackendBridge<LibTorch<OElem>> for PrecisionBridge<TElem>where
TElem: TchElement,
OElem: TchElement,
impl<TElem, OElem> BackendBridge<LibTorch<OElem>> for PrecisionBridge<TElem>where
TElem: TchElement,
OElem: TchElement,
source§fn into_target<const D: usize>(
tensor: FloatTensor<LibTorch<OElem>, D>,
device: Option<Device<Self::Target>>
) -> FloatTensor<Self::Target, D>
fn into_target<const D: usize>( tensor: FloatTensor<LibTorch<OElem>, 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<LibTorch<OElem>>>
) -> FloatTensor<LibTorch<OElem>, D>
fn from_target<const D: usize>( tensor: FloatTensor<Self::Target, D>, device: Option<Device<LibTorch<OElem>>> ) -> FloatTensor<LibTorch<OElem>, 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