Open MsQueeniee opened 2 weeks ago
为什么要在每一个block中使用zero_module将网络参数清零
Why do we need to use zero_module to zero out the network parameters in each block?
def zeromodule(module): """ Zero out the parameters of a module and return it. """ for p in module.parameters(): p.detach().zero() return module
为什么要在每一个block中使用zero_module将网络参数清零
Why do we need to use zero_module to zero out the network parameters in each block?
def zeromodule(module): """ Zero out the parameters of a module and return it. """ for p in module.parameters(): p.detach().zero() return module