(self, keys)
| 640 | return len(list(self.graph.nodes)) == 0 |
| 641 | |
| 642 | def get_submodule(self, keys): |
| 643 | assert keys |
| 644 | obj: Union[torch.nn.Module, Dict[str, torch.nn.Module]] = self.nn_modules |
| 645 | for k in keys.split("."): |
| 646 | if isinstance(obj, dict): |
| 647 | obj = obj[k] |
| 648 | else: |
| 649 | obj = getattr(obj, k) |
| 650 | return obj |
| 651 | |
| 652 | def new_var(self, name="tmp"): |
| 653 | existing = set(self.code_options["co_varnames"]) |
no test coverage detected