(module:nn.Module)
return module
If `module` is batchnorm/LayerNorm don't use half precision.
If `module` is batchnorm/LayerNorm don't use half precision.
If module is batchnorm / LayerNorm don t use half precision .
def bn2float(module:nn.Module)->nn.Module:
    "If `module` is batchnorm/LayerNorm don't use half precision."
    if isinstance(module, (torch.nn.modules.batchnorm._BatchNorm, torch.nn.LayerNorm)): module.float()
    for child in module.children(): bn2float(child)
    return module
def bn2float ( module : nn . Module ) -> nn . Module : if isinstance ( module , ( torch . nn . modules . batchnorm . _BatchNorm , torch . nn . LayerNorm ) ) : module . float ( ) for child in module . children ( ) : bn2float ( child ) return module