提交 1ca897a2 编写于 作者: Y yeliang2258

for test

上级 a87f7d3d
......@@ -59,8 +59,18 @@ def _rename_or_remove_weight(weights,
Returns:
None
'''
# if origin_name not in weights:
# raise KeyError('{} not a key in {}'.format(origin_name, weights.keys()))
# data = weights[origin_name]
# if target_name is not None:
# # rename weight
# weights[target_name] = data
if origin_name not in weights:
raise KeyError('{} not a key in {}'.format(origin_name, weights.keys()))
if is_remove:
# remove weight
data = weights.pop(origin_name)
else:
data = weights[origin_name]
if target_name is not None:
# rename weight
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册