svm_utils.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ml_defense 作者: arjunbhagoji 项目源码 文件源码
def model_loader(model_dict, adv=None, rd=None, rev=None):
    """
    Returns a classifier object if it already exists. Returns None, otherwise.
    """
    if adv is None:
        adv_mag = None
    print('Loading model...')
    abs_path_m = resolve_path_m(model_dict)
    try:
        clf = joblib.load(abs_path_m + get_svm_model_name(model_dict, adv, adv_mag, rd, rev) +
                          '.pkl')
    except BaseException:
        clf = None

    return clf
#------------------------------------------------------------------------------#
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号