(self, var: Variable)
| 812 | return created |
| 813 | |
| 814 | def mark_variable_as_graph_input(self, var: Variable): |
| 815 | if not isinstance(var, Variable): |
| 816 | raise TypeError(f'Except a variable here, however {type(var)} was given.') |
| 817 | var_name = var.name |
| 818 | if var_name not in self.variables: |
| 819 | raise KeyError(f'Can not find variable {var_name} within current graph.') |
| 820 | if var_name in self.inputs: return |
| 821 | if var_name in self.outputs: |
| 822 | raise KeyError(f'Can not mark variable {var_name} as graph input, cause it is graph output.') |
| 823 | self.inputs[var_name] = self.variables[var_name] |
| 824 | |
| 825 | def mark_variable_as_graph_output(self, var: Variable): |
| 826 | if not isinstance(var, Variable): |
no outgoing calls
no test coverage detected