From 314cc4952474c8105176a1f1988d3ffb812a154d Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Sun, 17 Oct 2021 16:40:05 +0800 Subject: [PATCH] Revert "fix the initializer of resnet unit op (#36483)" (#36487) This reverts commit 0452f27cba16b6e152ec3a39b581e5588ec74d2b. --- python/paddle/incubate/operators/resnet_unit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/paddle/incubate/operators/resnet_unit.py b/python/paddle/incubate/operators/resnet_unit.py index f2f391bdca9..cba1d4863cb 100644 --- a/python/paddle/incubate/operators/resnet_unit.py +++ b/python/paddle/incubate/operators/resnet_unit.py @@ -187,7 +187,9 @@ class ResNetUnit(Layer): filter_z_shape = [num_filters, filter_size, filter_size, num_channels_z] self.filter_x = self.create_parameter( - shape=filter_x_shape, attr=filter_x_attr, default_initializer=None) + shape=filter_x_shape, + attr=filter_x_attr, + default_initializer=_get_default_param_initializer(num_channels_x)) self.scale_x = self.create_parameter( shape=bn_param_shape, attr=scale_x_attr, @@ -218,7 +220,8 @@ class ResNetUnit(Layer): self.filter_z = self.create_parameter( shape=filter_z_shape, attr=filter_z_attr, - default_initializer=None) + default_initializer=_get_default_param_initializer( + num_channels_z)) self.scale_z = self.create_parameter( shape=bn_param_shape, attr=scale_z_attr, -- GitLab