Skip to content

Commit fb1a9fc

Browse files
committed
Resume prelu_test in python2
1 parent af83a17 commit fb1a9fc

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

python/paddle/fluid/tests/unittests/test_prelu_op.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import unittest
1818
import numpy as np
19+
import six
1920
from op_test import OpTest
2021

2122

@@ -62,17 +63,20 @@ def test_check_grad_3_ignore_alpha(self):
6263

6364

6465
# TODO(minqiyang): Resume these test cases after fixing Python3 CI job issues
65-
# class TestCase1(PReluTest):
66-
# def initTestCase(self):
67-
# self.attrs = {'mode': "all"}
66+
if six.PY2:
6867

69-
# class TestCase2(PReluTest):
70-
# def initTestCase(self):
71-
# self.attrs = {'mode': "channel"}
68+
class TestCase1(PReluTest):
69+
def initTestCase(self):
70+
self.attrs = {'mode': "all"}
71+
72+
class TestCase2(PReluTest):
73+
def initTestCase(self):
74+
self.attrs = {'mode': "channel"}
75+
76+
class TestCase3(PReluTest):
77+
def initTestCase(self):
78+
self.attrs = {'mode': "element"}
7279

73-
# class TestCase3(PReluTest):
74-
# def initTestCase(self):
75-
# self.attrs = {'mode': "element"}
7680

7781
if __name__ == "__main__":
7882
unittest.main()

0 commit comments

Comments
 (0)