Merge pull request #7812 from wanghaoshuang/fix_layer_helper

Deepcopy ParamAttr while creating parameter.
emailweixu-patch-1
whs 7 years ago committed by GitHub
commit bac401cd51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -111,6 +111,7 @@ class LayerHelper(object):
is_bias=False,
default_initializer=None):
# Deepcopy the attr so that parameters can be shared in program
attr = copy.deepcopy(attr)
assert isinstance(attr, ParamAttr)
suffix = 'b' if is_bias else 'w'

Loading…
Cancel
Save