Skip to content

Commit 4491209

Browse files
author
wangyang59
committed
minor change to convTransLayer test in test_LayerGrad
1 parent 53e1629 commit 4491209

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

paddle/gserver/tests/test_LayerGrad.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,9 @@ void testConvTransLayer(const string& type, bool trans, bool useGpu) {
349349
}
350350

351351
TEST(Layer, convTransLayer) {
352-
testConvTransLayer("exconvt", /* trans= */ false, /* useGpu= */ false);
353-
#ifndef PADDLE_ONLY_CPU
354-
testConvTransLayer("exconvt", /* trans= */ false, /* useGpu= */ true);
355-
#endif
352+
for (auto useGpu : {false, true}) {
353+
testConvTransLayer("exconvt", /* trans= */ false, /* useGpu= */ useGpu);
354+
}
356355
}
357356

358357
TEST(Layer, blockExpandLayer) {

0 commit comments

Comments
 (0)