pub struct Chain<A, B> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<A, B, T> Module for Chain<A, B>
impl<A, B, T> Module for Chain<A, B>
type Input = T
type Output = <B as Module>::Output
fn forward(&self, x: &Self::Input) -> Self::Output
fn gather_params(&self, params: &mut HashMap<usize, Tensor>)
fn update_params(&self, params: &mut HashMap<usize, Tensor>)
fn gather_named_params( &self, prefix: &str, params: &mut HashMap<String, Tensor> )
fn update_named_params( &self, prefix: &str, params: &mut HashMap<String, Tensor> )
fn params(&self) -> HashMap<usize, Tensor>
fn named_params(&self, prefix: &str) -> HashMap<String, Tensor>
fn to_safetensors<P: AsRef<Path>>(&self, filename: P)where
Self: Sized,
fn update_by_safetensors<P: AsRef<Path>>(&self, filenames: &[P])
fn chain<B>(self, b: B) -> Chain<Self, B>where
Self: Sized,
Auto Trait Implementations§
impl<A, B> RefUnwindSafe for Chain<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Chain<A, B>
impl<A, B> Sync for Chain<A, B>
impl<A, B> Unpin for Chain<A, B>
impl<A, B> UnwindSafe for Chain<A, B>where
A: UnwindSafe,
B: 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