提交 af62cf6f 编写于 作者: M Megvii Engine Team

fix(mge/utils): fix auto naming bug when expanding structure

GitOrigin-RevId: 5735bf51513a47b64bf5cdf6a065d3cdf1a8de56
上级 58ebb261
......@@ -92,6 +92,7 @@ class Sequential(Module):
return [getattr(self, key) for key in self.layer_keys]
def forward(self, inp):
for layer in self.layer_values:
# avoid layer_values as a name prefix, see Module.__getattribute__
for layer in [getattr(self, key) for key in self.layer_keys]:
inp = layer(inp)
return inp
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册