EarlyStopping¶
- class pybind11_ke.utils.EarlyStopping(save_path: str, patience: int = 2, verbose: bool = True, delta: float = 0)[源代码]¶
如果验证得分(越大越好)在给定的耐心后没有改善,则提前停止训练。
- __init__(save_path: str, patience: int = 2, verbose: bool = True, delta: float = 0)[源代码]¶
创建 EarlyStopping 对象。
- param save_path:
模型保存目录
- type save_path:
str
- param patience:
上次验证得分改善后等待多长时间。默认值:2
- type patience:
int
- param verbose:
如果为 True,则为每个验证得分改进打印一条消息。默认值:True
- type verbose:
bool
- 参数:
delta – 监测数量的最小变化才符合改进条件。默认值:0 :type delta: float
- __weakref__¶
list of weak references to the object (if defined)
- counter¶
计数变量
- delta¶
监测数量的最小变化才符合改进条件。默认值:0