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
9c5374d166
commit
39eceb3edc
Binary file not shown.
@ -162,15 +162,15 @@ class LoRAModule(nn.Module):
|
|||||||
self.reset_parameters()
|
self.reset_parameters()
|
||||||
|
|
||||||
def reset_parameters(self):
|
def reset_parameters(self):
|
||||||
nn.init.zeros_(self.lora_B.weight.data)
|
#nn.init.zeros_(self.lora_B.weight.data)
|
||||||
nn.init.zeros_(self.lora_B.bias.data)
|
#nn.init.zeros_(self.lora_B.bias.data)
|
||||||
|
nn.init.normal_(self.lora_B.weight.data)
|
||||||
|
nn.init.normal_(self.lora_B.bias.data)
|
||||||
|
|
||||||
nn.init.normal_(self.lora_A.weight.data)
|
nn.init.normal_(self.lora_A.weight.data)
|
||||||
nn.init.normal_(self.lora_A.bias.data)
|
nn.init.normal_(self.lora_A.bias.data)
|
||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
print('-'*30)
|
|
||||||
print(x)
|
|
||||||
print('-'*30)
|
|
||||||
x = x.transpose(0, 1)
|
x = x.transpose(0, 1)
|
||||||
x = self.lora_A(x)
|
x = self.lora_A(x)
|
||||||
x = self.lora_B(x)
|
x = self.lora_B(x)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user