tools.py 文件源码

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

项目:structured-output-ae 作者: sbelharbi 项目源码 文件源码
def evaluate_model_3D_unsup(list_minibatchs_vl, eval_fn):
    """Evalute the model over a set."""
    error, output, code = None, None, None
    for mn_vl in list_minibatchs_vl:
        x = theano.shared(
            mn_vl['x'], borrow=True).get_value(borrow=True)

        [error_mn, output_mn, code_mn] = eval_fn(x)
        if error is None:
            error = error_mn
            output = output_mn
            code = code_mn
        else:
            error = np.vstack((error, error_mn))
            output = np.vstack((output, output_mn))
            code = np.vstack((code, code_mn))

    return error, output, code
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号