diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index 9aba0b49ad880a07c06e6f3ae808048dca1b9070..557a91ca7b5b8f3cab40abecc7b6900cdb616064 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 585a5c7b23dd10c5223e07e91826bef1db1043c1..4f3002b19942ed58970bfd64e5978c1601273992 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 }