Struct burn::backend::autodiff::AutodiffBridge
pub struct AutodiffBridge<Bridge> { /* private fields */ }
Expand description
Enable autodiff on a backend bridge.
Trait Implementations§
§impl<B, C, Bridge> BackendBridge<Autodiff<B, C>> for AutodiffBridge<Bridge>
impl<B, C, Bridge> BackendBridge<Autodiff<B, C>> for AutodiffBridge<Bridge>
§type Target = Autodiff<<Bridge as BackendBridge<B>>::Target, C>
type Target = Autodiff<<Bridge as BackendBridge<B>>::Target, C>
The target backend
§fn into_target(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
_device: Option<<<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::Device>,
) -> <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive
fn into_target( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, _device: Option<<<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::Device>, ) -> <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive
Transfer the tensor to the target backend.
§fn from_target(
tensor: <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive,
_device: Option<<Autodiff<B, C> as Backend>::Device>,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn from_target( tensor: <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive, _device: Option<<Autodiff<B, C> as Backend>::Device>, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Transfer the tensor from the target backend.
Auto Trait Implementations§
impl<Bridge> Freeze for AutodiffBridge<Bridge>
impl<Bridge> RefUnwindSafe for AutodiffBridge<Bridge>where
Bridge: RefUnwindSafe,
impl<Bridge> Send for AutodiffBridge<Bridge>where
Bridge: Send,
impl<Bridge> Sync for AutodiffBridge<Bridge>where
Bridge: Sync,
impl<Bridge> Unpin for AutodiffBridge<Bridge>where
Bridge: Unpin,
impl<Bridge> UnwindSafe for AutodiffBridge<Bridge>where
Bridge: 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
§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