pub struct BurnToPyTorchAdapter;Expand description
Adapter for converting from Burn format to PyTorch format
Handles:
- Linear layer weight transposition (Burn: [in, out] → PyTorch: [out, in])
- Normalization parameter renaming (gamma → weight, beta → bias)
Trait Implementations§
Source§impl Clone for BurnToPyTorchAdapter
impl Clone for BurnToPyTorchAdapter
Source§fn clone(&self) -> BurnToPyTorchAdapter
fn clone(&self) -> BurnToPyTorchAdapter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BurnToPyTorchAdapter
impl Debug for BurnToPyTorchAdapter
Source§impl Default for BurnToPyTorchAdapter
impl Default for BurnToPyTorchAdapter
Source§fn default() -> BurnToPyTorchAdapter
fn default() -> BurnToPyTorchAdapter
Returns the “default value” for a type. Read more
Source§impl ModuleAdapter for BurnToPyTorchAdapter
impl ModuleAdapter for BurnToPyTorchAdapter
Source§fn adapt(&self, snapshot: &TensorSnapshot) -> TensorSnapshot
fn adapt(&self, snapshot: &TensorSnapshot) -> TensorSnapshot
Adapt a tensor snapshot based on its container type and parameter name
Source§fn get_alternative_param_name(
&self,
param_name: &str,
container_type: &str,
) -> Option<String>
fn get_alternative_param_name( &self, param_name: &str, container_type: &str, ) -> Option<String>
Get alternative parameter name to try during matching Read more
Source§fn clone_box(&self) -> Box<dyn ModuleAdapter>
fn clone_box(&self) -> Box<dyn ModuleAdapter>
Clone the adapter into a boxed trait object
Auto Trait Implementations§
impl Freeze for BurnToPyTorchAdapter
impl RefUnwindSafe for BurnToPyTorchAdapter
impl Send for BurnToPyTorchAdapter
impl Sync for BurnToPyTorchAdapter
impl Unpin for BurnToPyTorchAdapter
impl UnwindSafe for BurnToPyTorchAdapter
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