From 86053e7766a93ee0130131c20f262c58a4cbc86d Mon Sep 17 00:00:00 2001 From: wangmeng28 Date: Tue, 17 Oct 2017 12:20:43 +0800 Subject: [PATCH] Reduce the input size in testing factorization machine --- paddle/gserver/tests/test_LayerGrad.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/paddle/gserver/tests/test_LayerGrad.cpp b/paddle/gserver/tests/test_LayerGrad.cpp index 54053b751b..6c604b1e67 100644 --- a/paddle/gserver/tests/test_LayerGrad.cpp +++ b/paddle/gserver/tests/test_LayerGrad.cpp @@ -2365,14 +2365,15 @@ void testFactorizationMachineLayer(InputType type, bool useGpu) { config.layerConfig.set_factor_size(FACTOR_SIZE); config.layerConfig.set_size(1); config.biasSize = 0; - config.inputDefs.push_back({type, "layer_0", 1024, 10240}); + config.inputDefs.push_back({type, "layer_0", 128, 1280}); config.layerConfig.add_inputs(); testLayerGrad(config, "factorization_machine", 16, false, useGpu, false); } TEST(Layer, FactorizationMachineLayer) { - testFactorizationMachineLayer(INPUT_DATA, false); - testFactorizationMachineLayer(INPUT_DATA, true); + for (auto useGpu : {false, true}) { + testFactorizationMachineLayer(INPUT_DATA, useGpu); + } } int main(int argc, char** argv) { -- GitLab