remove class check in registry; add type assert in weight_init
This commit is contained in:
@@ -67,4 +67,6 @@ def generation_init_weights(module, init_type='normal', init_gain=0.02):
|
||||
# only normal distribution applies.
|
||||
normal_init(m, 1.0, init_gain)
|
||||
|
||||
assert isinstance(module, nn.Module)
|
||||
module.apply(init_func)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user