if shared_param.grad is not None:
return
shared_param._grad = param.grad
in this code, if there's no if shared_param.grad is not None: return shared_param._grad will be assigned each time? maybe just some performance loss?
maybe a stupid question, but i'm curious, thanks in advance.
in this code, if there's no
if shared_param.grad is not None: return
shared_param._grad will be assigned each time? maybe just some performance loss? maybe a stupid question, but i'm curious, thanks in advance.