| 19 | return {1.f, 0.6f, 0.5f, 0.4f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f, 0.3f}; |
| 20 | } |
| 21 | static bool inline shouldUseSparseConvolution(float sparsity, int sparseBlockOC) { |
| 22 | std::vector<float> thresholds = getSparsityThreshold(); |
| 23 | return sparsity > thresholds[std::min(std::max(sparseBlockOC, 0), (int)thresholds.size() - 1)]; |
| 24 | } |
| 25 | void AddSparseInfo(std::unique_ptr<MNN::OpT>& op, Compression::Pipeline proto) { |
| 26 | auto prune_algo_type = MNN::SparseAlgo_RANDOM; |
| 27 | int sparseBlockOC = 1; |
no test coverage detected