From b538c6d7f36101437915334343d7166fbae84323 Mon Sep 17 00:00:00 2001 From: Jiaqi Liu Date: Mon, 28 Jun 2021 14:10:39 +0800 Subject: [PATCH] update callback doc, test=document_fix (#33802) --- python/paddle/hapi/callbacks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/hapi/callbacks.py b/python/paddle/hapi/callbacks.py index 5f1f383438..cae3bbfd49 100644 --- a/python/paddle/hapi/callbacks.py +++ b/python/paddle/hapi/callbacks.py @@ -126,7 +126,8 @@ class CallbackList(object): class Callback(object): """ - Base class used to build new callbacks. + Base class used to build new callbacks. And new callbacks could also + terminate training by setting `model.stop_training=True`. Examples: @@ -685,7 +686,8 @@ class LRScheduler(Callback): class EarlyStopping(Callback): - """Stop training when the given monitor stopped improving during evaluation. + """Stop training when the given monitor stopped improving during evaluation + by setting `model.stop_training=True`. Args: monitor(str): Quantity to be monitored. Default: 'loss'. mode(str|None): Mode should be one of 'auto', 'min' or 'max'. In 'min' -- GitLab