MCPcopy
hub / github.com/modelscope/FunASR / eval

Method eval

funasr/models/lora/layers.py:96–103  ·  view source on GitHub ↗

Eval.

(self)

Source from the content-addressed store, hash-verified

94 self.merged = False
95
96 def eval(self):
97 """Eval."""
98 nn.Linear.eval(self)
99 if self.merge_weights and not self.merged:
100 # Merge the weights and mark it
101 if self.r > 0:
102 self.weight.data += (self.lora_B @ self.lora_A) * self.scaling
103 self.merged = True
104
105 def forward(self, x: torch.Tensor):
106 """Forward pass for training.

Callers

nothing calls this directly

Calls 1

evalMethod · 0.45

Tested by

no test coverage detected