MCPcopy Create free account
hub / github.com/pytorch/pytorch / insertInput

Method insertInput

caffe2/experiments/python/SparseTransformer.py:37–49  ·  view source on GitHub ↗

Insert input of this op also maintain the output of previous op p: a node or a list of node

(self, p)

Source from the content-addressed store, hash-verified

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):

Callers 3

__init__Method · 0.95
netbuilderFunction · 0.95
transFCReluFunction · 0.80

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected