diff --git a/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py b/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py index f22ca516ac234ae6bfe8aeb40f5a409ff0218df7..785505e720cbdc8dc32f53a8000f7816f676bf77 100644 --- a/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_mkldnn_op.py @@ -26,6 +26,9 @@ def create_test_mkldnn_use_ceil_class(parent): def init_ceil_mode(self): self.ceil_mode = True + def init_data_type(self): + self.dtype = np.float32 + cls_name = "{0}_{1}".format(parent.__name__, "MKLDNNCeilModeCast") TestMKLDNNPool2DUseCeilCase.__name__ = cls_name globals()[cls_name] = TestMKLDNNPool2DUseCeilCase @@ -41,6 +44,9 @@ def create_test_mkldnn_class(parent): def init_kernel_type(self): self.use_mkldnn = True + def init_data_type(self): + self.dtype = np.float32 + cls_name = "{0}_{1}".format(parent.__name__, "MKLDNNOp") TestMKLDNNCase.__name__ = cls_name globals()[cls_name] = TestMKLDNNCase @@ -78,6 +84,9 @@ class TestAsymPad(TestPool2D_Op): def init_global_pool(self): self.global_pool = False + def init_data_type(self): + self.dtype = np.float32 + class TestAsymPadCase1(TestAsymPad): def init_paddings(self):