From 4abd062e8773af6e144d4a8ae2385d1f4d1a3743 Mon Sep 17 00:00:00 2001 From: kinghuin Date: Thu, 17 Sep 2020 10:40:52 +0800 Subject: [PATCH] Update hook.md (#903) --- docs/Secondary_development/hook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Secondary_development/hook.md b/docs/Secondary_development/hook.md index 1dac3205..8f0a6b0a 100644 --- a/docs/Secondary_development/hook.md +++ b/docs/Secondary_development/hook.md @@ -92,7 +92,7 @@ def record_value(evaluation_scores, loss, s) def new_log_interval_event(self, run_states): # 改写的事件方法,参数列表务必与PaddleHub内置的相应方法保持一致 print("This is the new log_interval_event!") - scores, avg_loss, run_speed = calculate_metrics(run_states) + scores, avg_loss, run_speed = calculate_metrics(self, run_states) record_value(scores, avg_loss, run_speed) # 利用Hook改写PaddleHub内置_log_interval_event实现,需要2步(假设task已经创建好) -- GitLab