From 26638e9cab3e4287b0c90dea3aa5f5d4a81f603d Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Sat, 9 Sep 2017 10:50:57 +0800 Subject: [PATCH] fix batch_norm parameter share --- python/paddle/trainer/config_parser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index 11dc84ae206..12a629a031a 100644 --- a/python/paddle/trainer/config_parser.py +++ b/python/paddle/trainer/config_parser.py @@ -2421,6 +2421,11 @@ class BatchNormLayer(LayerBase): psize = self.calc_parameter_size(image_conf) dims = [1, psize] + + self.inputs[1].parameter_name = self.inputs[0].parameter_name.split('.')[0] + '.' + \ + self.inputs[1].parameter_name.split('.')[1] + self.inputs[2].parameter_name = self.inputs[0].parameter_name.split('.')[0] + '.' + \ + self.inputs[2].parameter_name.split('.')[1] self.create_input_parameter(0, psize) self.create_input_parameter(1, psize, dims) self.create_input_parameter(2, psize, dims) -- GitLab