提交 5768d032 编写于 作者: Y yeliang2258

add to and remove useless code

上级 1ca897a2
......@@ -59,15 +59,10 @@ 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:
# TODO There might be a problem here.
# remove weight
data = weights.pop(origin_name)
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册