提交 1da58b3b 编写于 作者: A Aston Zhang

block add and forward

上级 1e134c7b
......@@ -112,10 +112,10 @@ class MySequential(nn.Block):
super(MySequential, self).__init__(**kwargs)
def add(self, block):
self._children.append(block)
self._children[str(len(self._children))] = block
def forward(self, x):
for block in self._children:
for block in self._children.values():
x = block(x)
return x
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册