Struct fibertools_rs::m6a_burn::two_zero::Model
source · pub struct Model<B: Backend> { /* private fields */ }Implementations§
Trait Implementations§
source§impl<B> AutodiffModule<B> for Model<B>
impl<B> AutodiffModule<B> for Model<B>
§type InnerModule = Model<<B as AutodiffBackend>::InnerBackend>
type InnerModule = Model<<B as AutodiffBackend>::InnerBackend>
Inner module without auto-differentiation.
source§fn valid(&self) -> Self::InnerModule
fn valid(&self) -> Self::InnerModule
Get the same module, but on the inner backend without auto-differentiation.
source§impl<B: Backend> Module<B> for Model<B>
impl<B: Backend> Module<B> for Model<B>
§type Record = ModelRecord<B>
type Record = ModelRecord<B>
Type to save and load the module.
source§fn load_record(self, record: Self::Record) -> Self
fn load_record(self, record: Self::Record) -> Self
Load the module state from a record.
source§fn into_record(self) -> Self::Record
fn into_record(self) -> Self::Record
Convert the module into a record containing the state.
source§fn num_params(&self) -> usize
fn num_params(&self) -> usize
Get the number of parameters the module has, including all of its sub-modules.
source§fn visit<Visitor: ModuleVisitor<B>>(&self, visitor: &mut Visitor)
fn visit<Visitor: ModuleVisitor<B>>(&self, visitor: &mut Visitor)
Visit each tensor parameter in the module with a visitor.
source§fn map<Mapper: ModuleMapper<B>>(self, mapper: &mut Mapper) -> Self
fn map<Mapper: ModuleMapper<B>>(self, mapper: &mut Mapper) -> Self
Map each tensor parameter in the module with a mapper.
source§fn collect_devices(&self, devices: Devices<B>) -> Devices<B>
fn collect_devices(&self, devices: Devices<B>) -> Devices<B>
Return all the devices found in the underneath module tree added to the given vector
without duplicates.
source§fn to_device(self, device: &B::Device) -> Self
fn to_device(self, device: &B::Device) -> Self
Move the module and all of its sub-modules to the given device. Read more
source§fn fork(self, device: &B::Device) -> Self
fn fork(self, device: &B::Device) -> Self
Fork the module and all of its sub-modules to the given device. Read more
source§fn devices(&self) -> Vec<<B as Backend>::Device>
fn devices(&self) -> Vec<<B as Backend>::Device>
Return all the devices found in the underneath module tree without duplicates.
source§fn save_file<FR, PB>(
self,
file_path: PB,
recorder: &FR,
) -> Result<(), RecorderError>
fn save_file<FR, PB>( self, file_path: PB, recorder: &FR, ) -> Result<(), RecorderError>
Save the module to a file using the provided file recorder. Read more
source§fn load_file<FR, PB>(
self,
file_path: PB,
recorder: &FR,
device: &<B as Backend>::Device,
) -> Result<Self, RecorderError>
fn load_file<FR, PB>( self, file_path: PB, recorder: &FR, device: &<B as Backend>::Device, ) -> Result<Self, RecorderError>
Load the module from a file using the provided file recorder. Read more
Auto Trait Implementations§
impl<B> Freeze for Model<B>where
<B as Backend>::FloatTensorPrimitive<3>: Freeze,
<B as Backend>::FloatTensorPrimitive<2>: Freeze,
<B as Backend>::FloatTensorPrimitive<1>: Freeze,
impl<B> RefUnwindSafe for Model<B>where
B: RefUnwindSafe,
<B as Backend>::FloatTensorPrimitive<3>: RefUnwindSafe,
<B as Backend>::FloatTensorPrimitive<2>: RefUnwindSafe,
<B as Backend>::FloatTensorPrimitive<1>: RefUnwindSafe,
impl<B> Send for Model<B>
impl<B> Sync for Model<B>
impl<B> Unpin for Model<B>where
B: Unpin,
<B as Backend>::FloatTensorPrimitive<3>: Unpin,
<B as Backend>::FloatTensorPrimitive<2>: Unpin,
<B as Backend>::FloatTensorPrimitive<1>: Unpin,
impl<B> UnwindSafe for Model<B>where
B: UnwindSafe,
<B as Backend>::FloatTensorPrimitive<3>: UnwindSafe,
<B as Backend>::FloatTensorPrimitive<2>: UnwindSafe,
<B as Backend>::FloatTensorPrimitive<1>: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.