From 3494b79c4dee0e5382a2d7ea5f2754ff48893c79 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Fri, 16 Feb 2018 00:23:24 +0000 Subject: [PATCH] test error clip --- python/paddle/v2/fluid/tests/test_error_clip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/v2/fluid/tests/test_error_clip.py b/python/paddle/v2/fluid/tests/test_error_clip.py index 3d6ffe80744..d577d0014dc 100644 --- a/python/paddle/v2/fluid/tests/test_error_clip.py +++ b/python/paddle/v2/fluid/tests/test_error_clip.py @@ -43,7 +43,7 @@ prog_clip.block(0).var(hidden1.name).set_error_clip( avg_cost_clip = prog_clip.block(0).var(avg_cost.name) fluid.backward.append_backward(loss=avg_cost) fluid.backward.append_backward( - loss=avg_cost_clip, callbacks=fluid.clip.error_clip_callback) + loss=avg_cost_clip, callbacks=[fluid.clip.error_clip_callback]) hidden1_grad = prog.block(0).var(hidden1.name + "@GRAD") hidden1_grad_clip = prog_clip.block(0).var(hidden1.name + "@GRAD") -- GitLab