-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathPruningInfo.html
More file actions
145 lines (133 loc) · 8.83 KB
/
PruningInfo.html
File metadata and controls
145 lines (133 loc) · 8.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Pruning Information — MCT Documentation: ver 2.6.0</title>
<link rel="stylesheet" type="text/css" href="../../../static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../../static/bizstyle.css?v=5283bb3d" />
<link rel="stylesheet" type="text/css" href="../../../static/css/custom.css?v=01243f34" />
<script src="../../../static/documentation_options.js?v=ae39cb24"></script>
<script src="../../../static/doctools.js?v=9bcbadda"></script>
<script src="../../../static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../static/bizstyle.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--[if lt IE 9]>
<script src="static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="../../../index.html">MCT Documentation: ver 2.6.0</a> »</li>
<li class="nav-item nav-item-this"><a href="">Pruning Information</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="pruning-information">
<span id="ug-pruninginfo"></span><h1>Pruning Information<a class="headerlink" href="#pruning-information" title="Link to this heading">¶</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="model_compression_toolkit.pruning.PruningInfo">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">model_compression_toolkit.pruning.</span></span><span class="sig-name descname"><span class="pre">PruningInfo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pruning_masks</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">importance_scores</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#model_compression_toolkit.pruning.PruningInfo" title="Link to this definition">¶</a></dt>
<dd><p>PruningInfo stores information about a pruned model, including the pruning masks
and importance scores for each layer. This class acts as a container for accessing
pruning-related metadata.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pruning_masks</strong> (<em>Dict</em><em>[</em><em>BaseNode</em><em>, </em><em>np.ndarray</em><em>]</em>) – Stores the pruning masks for each layer. A pruning mask is an array where each element indicates whether the corresponding channel or neuron has been pruned (0) or kept (1).</p></li>
<li><p><strong>importance_scores</strong> (<em>Dict</em><em>[</em><em>BaseNode</em><em>, </em><em>np.ndarray</em><em>]</em>) – Stores the importance scores for each layer. Importance scores quantify the significance of each channel in the layer.</p></li>
</ul>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="model_compression_toolkit.pruning.PruningInfo.importance_scores">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">importance_scores</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">BaseNode</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#model_compression_toolkit.pruning.PruningInfo.importance_scores" title="Link to this definition">¶</a></dt>
<dd><p>The importance scores for each layer.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The importance scores.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>Dict[BaseNode, np.ndarray]</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">BaseNode</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code>]</p>
</dd>
</dl>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="model_compression_toolkit.pruning.PruningInfo.pruning_masks">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">pruning_masks</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">BaseNode</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">ndarray</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#model_compression_toolkit.pruning.PruningInfo.pruning_masks" title="Link to this definition">¶</a></dt>
<dd><p>The pruning masks for each layer.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The pruning masks.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>Dict[BaseNode, np.ndarray]</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Dict</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">BaseNode</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code>]</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Pruning Information</a><ul>
<li><a class="reference internal" href="#model_compression_toolkit.pruning.PruningInfo"><code class="docutils literal notranslate"><span class="pre">PruningInfo</span></code></a><ul>
<li><a class="reference internal" href="#model_compression_toolkit.pruning.PruningInfo.importance_scores"><code class="docutils literal notranslate"><span class="pre">PruningInfo.importance_scores</span></code></a></li>
<li><a class="reference internal" href="#model_compression_toolkit.pruning.PruningInfo.pruning_masks"><code class="docutils literal notranslate"><span class="pre">PruningInfo.pruning_masks</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="nav-item nav-item-0"><a href="../../../index.html">MCT Documentation: ver 2.6.0</a> »</li>
<li class="nav-item nav-item-this"><a href="">Pruning Information</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2022, Sony Semiconductor Solutions.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
</div>
</body>
</html>