(model:nn.Module)
return bn2float(bhalf(model))
Convert `model` to half precision except the batchnorm layers.
Convert `model` to half precision except the batchnorm layers.
Convert model to half precision except the batchnorm layers .
def model2half(model:nn.Module)->nn.Module:
    "Convert `model` to half precision except the batchnorm layers."
    return bn2float(bhalf(model))
def model2half ( model : nn . Module ) -> nn . Module : return bn2float ( bhalf ( model ) )