Skip to content

Commit f27ff4d

Browse files
committed
Revise code
1 parent 9ff0db3 commit f27ff4d

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

paddle/gserver/tests/test_LayerGrad.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,13 @@ TEST(Layer, BilinearInterpLayer) {
187187
bilinear->set_img_size_y(32);
188188
bilinear->set_num_channels(4);
189189

190-
bilinear->set_out_size_x(32);
191-
bilinear->set_out_size_y(32);
192-
testLayerGrad(config, "bilinear_interp", 10, false, false);
193-
testLayerGrad(config, "bilinear_interp", 10, false, true);
194-
195-
bilinear->set_out_size_x(64);
196-
bilinear->set_out_size_y(64);
197-
testLayerGrad(config, "bilinear_interp", 10, false, false);
198-
testLayerGrad(config, "bilinear_interp", 10, false, true);
190+
for (auto useGpu : {false, true}) {
191+
for (auto outSize : {32, 64}) {
192+
bilinear->set_out_size_x(outSize);
193+
bilinear->set_out_size_y(outSize);
194+
testLayerGrad(config, "bilinear_interp", 10, false, useGpu);
195+
}
196+
}
199197
}
200198

201199
TEST(Layer, concat) {

0 commit comments

Comments
 (0)