Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions loralib/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def reset_parameters(self):
nn.Embedding.reset_parameters(self)
if hasattr(self, 'lora_A'):
# initialize A the same way as the default for nn.Linear and B to zero
nn.init.zeros_(self.lora_A)
nn.init.normal_(self.lora_B)
nn.init.normal_(self.lora_A)
nn.init.zeros_(self.lora_B)

def train(self, mode: bool = True):
nn.Embedding.train(self, mode)
Expand Down