未验证 提交 0452f27c 编写于 作者: Z Zhang Zheng 提交者: GitHub

fix the initializer of resnet unit op (#36483)

* fix the initializer of resnet unit op

* fix the initializer of resnet unit op
上级 adb80494
...@@ -187,9 +187,7 @@ class ResNetUnit(Layer): ...@@ -187,9 +187,7 @@ class ResNetUnit(Layer):
filter_z_shape = [num_filters, filter_size, filter_size, num_channels_z] filter_z_shape = [num_filters, filter_size, filter_size, num_channels_z]
self.filter_x = self.create_parameter( self.filter_x = self.create_parameter(
shape=filter_x_shape, shape=filter_x_shape, attr=filter_x_attr, default_initializer=None)
attr=filter_x_attr,
default_initializer=_get_default_param_initializer(num_channels_x))
self.scale_x = self.create_parameter( self.scale_x = self.create_parameter(
shape=bn_param_shape, shape=bn_param_shape,
attr=scale_x_attr, attr=scale_x_attr,
...@@ -220,8 +218,7 @@ class ResNetUnit(Layer): ...@@ -220,8 +218,7 @@ class ResNetUnit(Layer):
self.filter_z = self.create_parameter( self.filter_z = self.create_parameter(
shape=filter_z_shape, shape=filter_z_shape,
attr=filter_z_attr, attr=filter_z_attr,
default_initializer=_get_default_param_initializer( default_initializer=None)
num_channels_z))
self.scale_z = self.create_parameter( self.scale_z = self.create_parameter(
shape=bn_param_shape, shape=bn_param_shape,
attr=scale_z_attr, attr=scale_z_attr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册