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
#------------------------------------------------------------------------------#
评论列表
文章目录