def get_model_params(model, bits=32):
    """Gets the model parameter size. One can also refer to torchsummay.
    Args:
        model: the input network
        bits: the default bits (torch.float32), 32 bits

    Returns:
        the size of model (Mb)
    """
    return sum(p.numel() for p in model.parameters() if p.requires_grad) * (bits/8) / (1024 * 1024)