diff --git a/python/paddle/incubate/operators/resnet_unit.py b/python/paddle/incubate/operators/resnet_unit.py index f2f391bdca946af156e0f3b28ebda546ab7251c7..cba1d4863cbd4323c985ba2a29a01203bbeef6a6 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,