(self, inputs)
| 103 | return out |
| 104 | |
| 105 | def forward_add(self, inputs): |
| 106 | layer_outputs = [] |
| 107 | x = inputs.clone() |
| 108 | for layer in self.layers: |
| 109 | x = layer(x) |
| 110 | layer_outputs.append(x) |
| 111 | if self.with_downsample: |
| 112 | inputs = self.skip(inputs) |
| 113 | |
| 114 | return torch.cat(layer_outputs, dim=1) + inputs |
| 115 | |
| 116 | def forward_cat(self, inputs): |
| 117 | x0 = self.layers[0](inputs) |