MCPcopy Create free account
hub / github.com/modelscope/FunASR / forward

Method forward

funasr/models/lora/layers.py:464–480  ·  view source on GitHub ↗

Forward pass for training. Args: x: TODO.

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

462 self.merged = True
463
464 def forward(self, x: torch.Tensor):
465 """Forward pass for training.
466
467 Args:
468 x: TODO.
469 """
470 if self.r > 0 and not self.merged:
471 return F.conv2d(
472 x,
473 self.weight + (self.lora_B @ self.lora_A).view(self.weight.shape) * self.scaling,
474 self.bias,
475 self.stride,
476 self.padding,
477 self.dilation,
478 self.groups,
479 )
480 return nn.Conv2d.forward(self, x)

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected