未验证 提交 90d92111 编写于 作者: W wanghuancoder 提交者: GitHub

let LayerList could add [None], test=develop (#30911)

上级 aab3a301
......@@ -959,7 +959,7 @@ class Layer(core.Layer):
for prefix, layer in model.named_sublayers():
print(prefix, layer)
"""
assert isinstance(sublayer, core.Layer)
assert (isinstance(sublayer, core.Layer) or sublayer == None)
self._sub_layers[name] = sublayer
return sublayer
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册