(self, type, *args)
| 624 | return NetBuilder.add(self, child) |
| 625 | |
| 626 | def __exit__(self, type, *args): |
| 627 | if type is None: |
| 628 | _then_nets = self._children |
| 629 | self._reset_children() |
| 630 | |
| 631 | self._then_net = NetBuilder.merge_nets( |
| 632 | _then_nets, self._lexical_scope) |
| 633 | if not self._then_net: |
| 634 | self._then_net = core.Net('empty_then_net') |
| 635 | |
| 636 | if_net = core.Net(self.name + '/if_net') |
| 637 | add_if_op(if_net, self._cond_blob, self._lexical_scope, |
| 638 | self._then_net, self._else_net) |
| 639 | |
| 640 | self._current_net = if_net |
| 641 | self._children = [if_net] |
| 642 | NetBuilder.__exit__(self, type, *args) |
| 643 | |
| 644 | |
| 645 | class _RunElseNet(NetBuilder): |
nothing calls this directly
no test coverage detected