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

Function fc_sparse

caffe2/python/helpers/fc.py:185–197  ·  view source on GitHub ↗

FC_Sparse: Only takes in allocated weights

(
    model, blob_in, blob_out, w_csr, iw, jw, bias,
    **kwargs
)

Source from the content-addressed store, hash-verified

183
184
185def fc_sparse(
186 model, blob_in, blob_out, w_csr, iw, jw, bias,
187 **kwargs
188):
189 """FC_Sparse: Only takes in allocated weights"""
190 if not (w_csr and iw and jw and bias):
191 print("Warning...")
192 model.AddParameter(w_csr)
193 model.AddParameter(iw)
194 model.AddParameter(jw)
195 model.AddParameter(bias)
196 return model.net.FC_Sparse([blob_in, w_csr, iw, jw, bias],
197 blob_out, **kwargs)

Callers

nothing calls this directly

Calls 2

AddParameterMethod · 0.80
FC_SparseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…