pub struct ComposedFunction { /* private fields */ }Expand description
Composed function that applies multiple functions in sequence Note: Due to type erasure limitations, this is a placeholder structure
Implementations§
Trait Implementations§
Source§impl DynFunction for ComposedFunction
impl DynFunction for ComposedFunction
Source§fn is_differentiable(&self) -> bool
fn is_differentiable(&self) -> bool
Whether this function is differentiable
Source§fn memory_complexity(&self) -> MemoryComplexity
fn memory_complexity(&self) -> MemoryComplexity
Memory complexity hint for optimization
Source§fn computational_complexity(&self) -> ComputationalComplexity
fn computational_complexity(&self) -> ComputationalComplexity
Computational complexity hint for optimization
Source§fn is_fusable(&self) -> bool
fn is_fusable(&self) -> bool
Whether this function can be fused with others
Source§fn metadata(&self) -> FunctionMetadata
fn metadata(&self) -> FunctionMetadata
Get function metadata for optimization
Source§impl Function for ComposedFunction
impl Function for ComposedFunction
Source§fn forward<T>(
&self,
_ctx: &mut FunctionContext,
_inputs: &[&dyn AutogradTensor<T>],
) -> Result<Vec<Box<dyn AutogradTensor<T>>>>where
T: TensorElement,
fn forward<T>(
&self,
_ctx: &mut FunctionContext,
_inputs: &[&dyn AutogradTensor<T>],
) -> Result<Vec<Box<dyn AutogradTensor<T>>>>where
T: TensorElement,
Forward pass computation
Source§fn backward<T>(
&self,
_ctx: &mut FunctionContext,
_grad_outputs: &[&dyn AutogradTensor<T>],
) -> Result<Vec<Option<Box<dyn AutogradTensor<T>>>>>where
T: TensorElement,
fn backward<T>(
&self,
_ctx: &mut FunctionContext,
_grad_outputs: &[&dyn AutogradTensor<T>],
) -> Result<Vec<Option<Box<dyn AutogradTensor<T>>>>>where
T: TensorElement,
Backward pass computation
Auto Trait Implementations§
impl Freeze for ComposedFunction
impl RefUnwindSafe for ComposedFunction
impl Send for ComposedFunction
impl Sync for ComposedFunction
impl Unpin for ComposedFunction
impl UnsafeUnpin for ComposedFunction
impl UnwindSafe for ComposedFunction
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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