From c3527f5526ee96398760cbef11d7de48f41fe998 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Mon, 30 Dec 2019 14:38:44 +0800 Subject: [PATCH] Annotate NormOP test to skip grad check (#21894) --- python/paddle/fluid/tests/unittests/test_norm_op.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_norm_op.py b/python/paddle/fluid/tests/unittests/test_norm_op.py index 00ea930251b..15e033dc211 100644 --- a/python/paddle/fluid/tests/unittests/test_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_norm_op.py @@ -16,7 +16,7 @@ from __future__ import print_function import unittest import numpy as np -from op_test import OpTest +from op_test import OpTest, skip_check_grad_ci def l2_norm(x, axis, epsilon): @@ -63,6 +63,8 @@ class TestNormOp3(TestNormOp): self.epsilon = 1e-8 +@skip_check_grad_ci(reason="'check_grad' on large inputs is too slow, " + + "however it is desirable to cover the forward pass") class TestNormOp4(TestNormOp): def init_test_case(self): self.shape = [128, 1024, 14, 14] @@ -70,10 +72,11 @@ class TestNormOp4(TestNormOp): self.epsilon = 1e-8 def test_check_grad(self): - # since the gradient check is very slow in large shape, so skip check_grad pass +@skip_check_grad_ci(reason="'check_grad' on large inputs is too slow, " + + "however it is desirable to cover the forward pass") class TestNormOp5(TestNormOp): def init_test_case(self): self.shape = [2048, 2048] @@ -81,7 +84,6 @@ class TestNormOp5(TestNormOp): self.epsilon = 1e-8 def test_check_grad(self): - # since the gradient check is very slow in large shape, so skip check_grad pass -- GitLab