From 8654e8a5203c62ca7b69c1778ff0b71f7c5f8223 Mon Sep 17 00:00:00 2001 From: wangmeng28 Date: Tue, 17 Oct 2017 23:42:51 +0800 Subject: [PATCH] Fix dims in config parser for factorization machine layer --- python/paddle/trainer/config_parser.py | 2 +- .../tests/configs/protostr/test_factorization_machine.protostr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index 9aba0b49ad8..557a91ca7b5 100644 --- a/python/paddle/trainer/config_parser.py +++ b/python/paddle/trainer/config_parser.py @@ -3794,7 +3794,7 @@ class FactorizationMachineLayer(LayerBase): self.config.factor_size = factor_size input_layer = self.get_input_layer(0) psize = input_layer.size * factor_size - dims = [input_layer.size, 1] + dims = [input_layer.size, factor_size] self.create_input_parameter(0, psize, dims) diff --git a/python/paddle/trainer_config_helpers/tests/configs/protostr/test_factorization_machine.protostr b/python/paddle/trainer_config_helpers/tests/configs/protostr/test_factorization_machine.protostr index 585a5c7b23d..4f3002b1994 100644 --- a/python/paddle/trainer_config_helpers/tests/configs/protostr/test_factorization_machine.protostr +++ b/python/paddle/trainer_config_helpers/tests/configs/protostr/test_factorization_machine.protostr @@ -22,7 +22,7 @@ parameters { initial_mean: 0.0 initial_std: 0.03125 dims: 1024 - dims: 1 + dims: 10 initial_strategy: 0 initial_smart: true } -- GitLab