mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
9c133b4516
commit
b334bf5d0d
Binary file not shown.
Binary file not shown.
@ -165,10 +165,10 @@ class LoRAModule(nn.Module):
|
|||||||
nn.init.zeros_(self.lora_B)
|
nn.init.zeros_(self.lora_B)
|
||||||
nn.init_normal_(self.lora_A)
|
nn.init_normal_(self.lora_A)
|
||||||
|
|
||||||
def forward(self, x, layer_idx=-1):
|
def forward(self, x):
|
||||||
x = x.transpose(0, 1)
|
x = x.transpose(0, 1)
|
||||||
x = self.lora_A[layer_idx](x)
|
x = self.lora_A(x)
|
||||||
x = self.lora_B[layer_idx](x)
|
x = self.lora_B(x)
|
||||||
x = x.transpose(0, 1)
|
x = x.transpose(0, 1)
|
||||||
x *= self.scaling
|
x *= self.scaling
|
||||||
return x
|
return x
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user