LoRA icon indicating copy to clipboard operation
LoRA copied to clipboard

T(w) problem

Open fclearner opened this issue 9 months ago • 0 comments

I'm confused about why T(w) is the inner function https://github.com/microsoft/LoRA/blob/dc5d1744fa9430edda10bc233a9efc65e9239f50/loralib/layers.py#L128

torch.jit.script will report error: torch.jit.frontend.UnsupportedNodeError: function definitions aren't supported: def forward(self, x: torch.Tensor): def T(w): ~~~ <--- HERE return w.transpose(0, 1) if self.fan_in_fan_out else w if self.r > 0 and not self.merged:

is there any method to fix it, writing the T(w) as the Class function is working

fclearner avatar Sep 27 '23 02:09 fclearner