(self, type, *args)
| 727 | self._cond_net = None |
| 728 | |
| 729 | def __exit__(self, type, *args): |
| 730 | if type is None: |
| 731 | condition_body = self._children |
| 732 | self._reset_children() |
| 733 | self._cond_net = NetBuilder.merge_nets( |
| 734 | condition_body, self._lexical_scope) |
| 735 | assert self._cond_net, 'Invalid loop condition specified' |
| 736 | assert len(self._cond_net.Proto().op) > 0, 'Invalid condition net' |
| 737 | last_op = self._cond_net.Proto().op[-1] |
| 738 | assert len(last_op.output) == 1, 'Invalid condition net' |
| 739 | self._cond_blob = core.BlobReference(name=last_op.output[0], net=None) |
| 740 | |
| 741 | self._current_net = self._cond_net |
| 742 | self._children = [self._cond_net] |
| 743 | NetBuilder.__exit__(self, type, *args) |
nothing calls this directly
no test coverage detected