evaluation.py 文件源码

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

项目:srep 作者: Answeror 项目源码 文件源码
def _crossval_predict(self, **kargs):
    proba = kargs.pop('proba', False)
    fold = int(kargs.pop('fold'))
    Mod = kargs.pop('Mod')
    Mod = deepcopy(Mod)
    Mod.update(params=self.format_params(Mod['params'], fold))
    context = Mod.pop('context', [mx.gpu(0)])
    #  import pickle
    #  d = kargs.copy()
    #  d.update(Mod=Mod, fold=fold)
    #  print(pickle.dumps(d))

    #  Ensure load from disk.
    #  Otherwise following cached methods like vote will have two caches,
    #  one for the first computation,
    #  and the other for the cached one.
    func = _crossval_predict_aux if not proba else _crossval_predict_proba_aux
    return func.call_and_shelve(self, Mod=Mod, fold=fold, context=context, **kargs).get()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号