weights发出keras提前停止

weights发出keras提前停止

本文介绍了restore_best_weights发出keras提前停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Keras的EarlyStopping用于我的深度学习项目. 此处文档提到了恢复最佳权重的非常有用的想法.但是不知何故我还不能使用它.我正在使用通过Anaconda安装的Keras 2.2.2/TF 1.10.调用很简单,如下所示.有什么问题吗?

I am using EarlyStopping from Keras for my deep learning project. The documentations here mentions a very useful idea of restoring best weights. But somehow I am not able to use it yet. I am using Keras 2.2.2/TF 1.10, installed using Anaconda.Call is simple as follows. is there any issue?

es = EarlyStopping(monitor='val_acc', min_delta=1e-4, patience=patience_,verbose=1,restore_best_weights=True)

推荐答案

啊,一个很常见的问题.网上的keras文档是从github的master分支生成的,因此那里仅提供了最近才引入的功能,但在任何Keras版本中都没有.

Ah, a very common problem. The keras documentation online is produced from the master branch in github, so features that have been introduced only recently are present there, but not yet in any Keras release.

因此,EarlyStopping回调的restore_best_weights选项是在2018年8月18日添加的,而当前最新的Keras版本(2.2.2)是在2018年7月28日发布的.因此,您将不得不使用Keras master ,等待Keras发行,或者不使用该选项.

So the restore_best_weights option of the EarlyStopping callback was added on August 18, 2018, while currently the latest Keras release (2.2.2) was made on July 28, 2018. So you will have to use Keras master, wait for a Keras release, or just not use the option.

更新:它现在包含在 Keras 2.2.3 发布.

Update: It is now included in Keras 2.2.3 release.

这篇关于restore_best_weights发出keras提前停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 00:42