(self, x)
| 107 | self.splits = in_splits |
| 108 | |
| 109 | def forward(self, x): |
| 110 | if len(self.splits) > 1: |
| 111 | x_split = torch.split(x, self.splits, 1) |
| 112 | x_out = [c(x) for x, c in zip(x_split, self._modules.values())] |
| 113 | x = torch.cat(x_out, 1) |
| 114 | else: |
| 115 | x_out = [c(x) for c in self._modules.values()] |
| 116 | x = x_out[0] |
| 117 | return x |
| 118 | |
| 119 | |
| 120 | # helper method |