Args: x (torch.Tensor): In shape of (B, C, H, W)
(self, x)
| 107 | nn.init.kaiming_normal_(self.A.weight, a=1) |
| 108 | |
| 109 | def forward(self, x): |
| 110 | """ |
| 111 | Args: |
| 112 | x (torch.Tensor): In shape of (B, C, H, W) |
| 113 | """ |
| 114 | w_out = self.W(x) |
| 115 | a_out = self.A(x) |
| 116 | b_out = self.B(a_out) |
| 117 | |
| 118 | return w_out + b_out * self.lora_scale |
| 119 | |
| 120 | |
| 121 | class LoRAAdapterConv(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected