pub struct Lfm2Conv {
pub in_proj: Linear,
pub conv_weight: Tensor,
pub conv_bias: Tensor,
pub out_proj: Linear,
}Expand description
LFM2 short-convolution operator: projection, depthwise conv, projection.
Fields§
§in_proj: LinearInput projection.
conv_weight: TensorDepthwise kernel [dim, 3].
conv_bias: TensorBias [dim].
out_proj: LinearOutput projection.
Implementations§
Source§impl Lfm2Conv
impl Lfm2Conv
Sourcepub fn forward(&self, engine: &ComputeEngine, x: &Tensor) -> Tensor
pub fn forward(&self, engine: &ComputeEngine, x: &Tensor) -> Tensor
Applies the operator to x.
Sourcepub fn lora_params(&self) -> Vec<Tensor>
pub fn lora_params(&self) -> Vec<Tensor>
Only the LoRA adapter tensors (what LoRA fine-tuning updates).
Auto Trait Implementations§
impl !RefUnwindSafe for Lfm2Conv
impl !Send for Lfm2Conv
impl !Sync for Lfm2Conv
impl !UnwindSafe for Lfm2Conv
impl Freeze for Lfm2Conv
impl Unpin for Lfm2Conv
impl UnsafeUnpin for Lfm2Conv
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> 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