functions.py 文件源码

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

项目:ECNN 作者: alazareva 项目源码 文件源码
def stopping_rule():
    window = []
    window_size = 5
    def c(val_acc):
        nonlocal window
        nonlocal window_size
        print('acc', val_acc)
        window.append(val_acc)
        if len(window) == window_size:
            diffs = np.ediff1d(window)
            if np.all(diffs < 0):
                return True
            window.pop(0)
        return False
    return c
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号