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

Function Prune2Sparse

caffe2/experiments/python/SparseTransformer.py:145–153  ·  view source on GitHub ↗
(cur, id2node, name2id, ops, model)

Source from the content-addressed store, hash-verified

143
144
145def Prune2Sparse(cur, id2node, name2id, ops, model):
146 # Assume that FC and Relu takes in only 1 input;
147 # If not raise warning
148 if not cur.visited and cur.optype == "FC_Prune":
149 transFCRelu(cur, id2node, name2id, ops, model)
150
151 cur.visited = True
152 for name, n in cur.ops.iteritems():
153 Prune2Sparse(n, id2node, name2id, ops, model)
154
155
156def net2list(net_root):

Callers

nothing calls this directly

Calls 1

transFCReluFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…