(layer_groups)
return split_groups
Split the layers in `layer_groups` into batchnorm (`bn_types`) and non-batchnorm groups.
Split the layers in `layer_groups` into batchnorm (`bn_types`) and non-batchnorm groups.
Split the layers in layer_groups into batchnorm ( bn_types ) and non - batchnorm groups .
def split_bn_bias(layer_groups):
    "Split the layers in `layer_groups` into batchnorm (`bn_types`) and non-batchnorm groups."
    split_groups = []
    for l in layer_groups:
        l1, l2 = [], []
        for c in l.children():
            if isinstance(c, bn_types): l2.append(c)
            else: l1.append(c)
        split_groups += [nn.Sequential(*l1), nn.Sequential(*l2)]
    return split_groups
def split_bn_bias ( layer_groups ) : split_groups = [ ] for l in layer_groups : l1 , l2 = [ ] , [ ] for c in l . children ( ) : if isinstance ( c , bn_types ) : l2 . append ( c ) else : l1 . append ( c ) split_groups += [ nn . Sequential ( * l1 ) , nn . Sequential ( * l2 ) ] return split_groups