def drop_float2cfg_mapping(drop_prob=0., type='Dropout2d'):
    """ Map input drop_prob (float) into the drop_dict
    Args:
        drop_prob (float): dropout probability

    Returns:
        drop_cfg
    """
    assert isinstance(drop_prob, float)
    if drop_prob > 0.:
        drop_cfg = {'type': type, 'p': drop_prob}
    else:
        drop_cfg = None
    return drop_cfg