From af6f3c0423f6ffd6c5480eeee5d340a5aad3e487 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sat, 30 Sep 2017 15:34:52 -0700 Subject: [PATCH] use float32 in cond_op --- python/paddle/v2/framework/tests/test_cond_op.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/v2/framework/tests/test_cond_op.py b/python/paddle/v2/framework/tests/test_cond_op.py index 3698ce9c8ed5c..76323b5e10c59 100644 --- a/python/paddle/v2/framework/tests/test_cond_op.py +++ b/python/paddle/v2/framework/tests/test_cond_op.py @@ -15,7 +15,7 @@ def __init__(self): for i in range(1, 10, 2): array[i] = 0 self.cond = np.array(array) - self.x = np.ones(shape=(10, 1)) + self.x = np.ones(shape=(10, 1)).astype("float32") def forward(self): self.index_t = np.where(self.cond == 1)