| 22 | |
| 23 | |
| 24 | class VarWrapper: |
| 25 | def __init__(self, var, graph): |
| 26 | assert isinstance(var, Variable) |
| 27 | assert isinstance(graph, GraphWrapper) |
| 28 | self._var = var |
| 29 | self._graph = graph |
| 30 | |
| 31 | def name(self): |
| 32 | """ |
| 33 | Get the name of the variable. |
| 34 | """ |
| 35 | return self._var.name |
| 36 | |
| 37 | def shape(self): |
| 38 | """ |
| 39 | Get the shape of the variable. |
| 40 | """ |
| 41 | return self._var.shape |
| 42 | |
| 43 | |
| 44 | class OpWrapper: |