mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
7c44951a40
commit
2ddec73e3a
Binary file not shown.
Binary file not shown.
@ -131,7 +131,11 @@ LRSchedulerType = Union[torch.optim.lr_scheduler._LRScheduler, optim.LRScheduler
|
|||||||
class LoRAHook():
|
class LoRAHook():
|
||||||
def __init__(self, module):
|
def __init__(self, module):
|
||||||
self.hook = module.register_forward_hook(self.hook_fn)
|
self.hook = module.register_forward_hook(self.hook_fn)
|
||||||
|
self.lora = LoRAModule(
|
||||||
|
embedding_dim=768,
|
||||||
|
rank=4,
|
||||||
|
lora_alpha=1.0,
|
||||||
|
)
|
||||||
def hook_fn(self, module, input, output):
|
def hook_fn(self, module, input, output):
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user