Update xlayers

This commit is contained in:
D-X-Y
2021-05-07 10:26:35 +08:00
parent f6a024a6ff
commit 80aaac4dfa
9 changed files with 333 additions and 83 deletions

View File

@@ -111,3 +111,10 @@ class SuperSequential(SuperModule):
for module in self:
input = module(input)
return input
def forward_with_container(self, input, container, prefix=[]):
for index, module in enumerate(self):
input = module.forward_with_container(
input, container, prefix + [str(index)]
)
return input