Combine mask and weights create wcsr, iw, jw, return their names
(weight_name)
| 55 | |
| 56 | |
| 57 | def maskNallocate(weight_name): |
| 58 | """ |
| 59 | Combine mask and weights |
| 60 | create wcsr, iw, jw, return their names |
| 61 | """ |
| 62 | w = workspace.FetchBlob(weight_name) |
| 63 | w_csr = scipy.sparse.csr_matrix(w) |
| 64 | wcsr = w_csr.data |
| 65 | iw = w_csr.indptr |
| 66 | jw = w_csr.indices |
| 67 | workspace.FeedBlob(weight_name + "wcsr", wcsr) |
| 68 | workspace.FeedBlob(weight_name + "iw", iw) |
| 69 | workspace.FeedBlob(weight_name + "jw", jw) |
| 70 | return weight_name + "wcsr", weight_name + "iw", weight_name + "jw" |
| 71 | |
| 72 | |
| 73 | def transFCRelu(cur, id2node, name2id, ops, model): |
no outgoing calls
no test coverage detected
searching dependent graphs…