mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-08-18 11:52:00 +08:00
refractor
This commit is contained in:
9
labml_nn/utils.py
Normal file
9
labml_nn/utils.py
Normal file
@ -0,0 +1,9 @@
|
||||
import copy
|
||||
|
||||
from torch import nn
|
||||
|
||||
from labml_helpers.module import Module
|
||||
|
||||
|
||||
def clone_module_list(module: Module, n: int):
|
||||
return nn.ModuleList([copy.deepcopy(module) for _ in range(n)])
|
Reference in New Issue
Block a user