(self, x: Tensor)
| 352 | return x |
| 353 | |
| 354 | def forward2(self, x: Tensor) -> Tensor: |
| 355 | cfg = self.config |
| 356 | x = self.inc(x) |
| 357 | x = self.inc(x) |
| 358 | if cfg.child is not None: |
| 359 | # Can also call children's method directly, if each child is invoked only once and |
| 360 | # the method is wrapped for auto child context. |
| 361 | x = self.child1.forward2(x) |
| 362 | x = self.child2.forward2(x) |
| 363 | return x |
| 364 | |
| 365 | def inc(self, x: Tensor) -> Tensor: |
| 366 | self.add_summary("x", x) |