未验证 提交 27a5c0cf 编写于 作者: W wanghuancoder 提交者: GitHub

fix layers train eval bug (#30580)

* delete empty line of pybing.cc, test=develop

* fix layers train eval bug, test=develop
上级 8126a41d
......@@ -152,7 +152,7 @@ class Layer(core.Layer):
# Layer-level setting
self.training = True
for layer in self.sublayers():
layer.train()
layer.training = True
def eval(self):
"""
......@@ -193,7 +193,7 @@ class Layer(core.Layer):
# Layer-level setting
self.training = False
for layer in self.sublayers():
layer.eval()
layer.training = False
def apply(self, fn):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册