Insert input of this op also maintain the output of previous op p: a node or a list of node
(self, p)
| 35 | self.op = op |
| 36 | |
| 37 | def insertInput(self, p): |
| 38 | """ |
| 39 | Insert input of this op |
| 40 | also maintain the output of previous op |
| 41 | p: a node or a list of node |
| 42 | """ |
| 43 | if isinstance(p, list): |
| 44 | for i in p: |
| 45 | self.prev[i.name] = i |
| 46 | i.ops[self.name] = self |
| 47 | elif isinstance(p, NetDefNode): |
| 48 | self.prev[p.name] = p |
| 49 | p.ops[self.name] = self |
| 50 | |
| 51 | def deleteInput(self, p): |
| 52 | if isinstance(p, NetDefNode): |
no test coverage detected