index.html 10.9 KB
Newer Older
1
<!DOCTYPE html>
2 3 4 5 6 7 8 9 10
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="None">
  
  <link rel="shortcut icon" href="img/favicon.ico">
11
  <title>Home - PaddleSlim Docs</title>
12
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
13

14 15 16 17 18 19
  <link rel="stylesheet" href="css/theme.css" type="text/css" />
  <link rel="stylesheet" href="css/theme_extra.css" type="text/css" />
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
  
  <script>
    // Current page data
20
    var mkdocs_page_name = "Home";
21 22 23 24 25 26 27 28 29 30
    var mkdocs_page_input_path = "index.md";
    var mkdocs_page_url = null;
  </script>
  
  <script src="js/jquery-2.1.1.min.js" defer></script>
  <script src="js/modernizr-2.8.3.min.js" defer></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script> 
  
</head>
31

32
<body class="wy-body-for-nav" role="document">
33

34
  <div class="wy-grid-for-nav">
35

36 37 38
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
      <div class="wy-side-nav-search">
39
        <a href="." class="icon icon-home"> PaddleSlim Docs</a>
40 41 42 43 44 45
        <div role="search">
  <form id ="rtd-search-form" class="wy-form" action="./search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  </form>
</div>
      </div>
46

47 48 49 50 51 52
      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
	<ul class="current">
	  
          
            <li class="toctree-l1 current">
		
53
    <a class="current" href=".">Home</a>
54
    <ul class="subnav">
55
            
56
    <li class="toctree-l2"><a href="#paddleslim">PaddleSlim</a></li>
57 58 59
    
        <ul>
        
60
            <li><a class="toctree-l3" href="#_1">功能</a></li>
61
        
62
            <li><a class="toctree-l3" href="#_2">安装</a></li>
63
        
64
            <li><a class="toctree-l3" href="#_3">使用</a></li>
65
        
66
            <li><a class="toctree-l3" href="#_4">贡献与反馈</a></li>
67 68 69 70
        
        </ul>
    

71
    </ul>
72 73 74 75
	    </li>
          
            <li class="toctree-l1">
		
76 77 78 79 80
    <a class="" href="model_zoo/">模型库</a>
	    </li>
          
            <li class="toctree-l1">
		
81
    <span class="caption-text">教程</span>
82 83 84
    <ul class="subnav">
                <li class="">
                    
85
    <a class="" href="tutorials/quant_post_demo/">离线量化</a>
86
                </li>
87
                <li class="">
88
                    
89
    <a class="" href="tutorials/quant_aware_demo/">量化训练</a>
90
                </li>
91 92
                <li class="">
                    
93
    <a class="" href="tutorials/quant_embedding_demo/">Embedding量化</a>
94
                </li>
95
                <li class="">
96
                    
97
    <a class="" href="tutorials/nas_demo/">SA搜索</a>
98
                </li>
99
                <li class="">
100
                    
101
    <a class="" href="tutorials/distillation_demo/">知识蒸馏</a>
102
                </li>
103 104 105 106 107
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
108
    <span class="caption-text">API</span>
109
    <ul class="subnav">
110
                <li class="">
111
                    
112
    <a class="" href="api/quantization_api/">量化</a>
113
                </li>
114
                <li class="">
115
                    
116
    <a class="" href="api/prune_api/">剪枝与敏感度</a>
117
                </li>
118
                <li class="">
119
                    
120
    <a class="" href="api/analysis_api/">模型分析</a>
121
                </li>
122 123
                <li class="">
                    
124
    <a class="" href="api/single_distiller_api/">知识蒸馏</a>
125
                </li>
126 127
                <li class="">
                    
128 129 130 131 132 133 134 135 136
    <a class="" href="api/nas_api/">SA搜索</a>
                </li>
                <li class="">
                    
    <a class="" href="api/search_space/">搜索空间</a>
                </li>
                <li class="">
                    
    <a class="" href="table_latency/">硬件延时评估表</a>
137
                </li>
138
    </ul>
139 140
	    </li>
          
141 142 143 144 145
            <li class="toctree-l1">
		
    <a class="" href="algo/algo/">算法原理</a>
	    </li>
          
146 147 148 149
        </ul>
      </div>
      &nbsp;
    </nav>
150

151
    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
152

153 154 155
      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
156
        <a href=".">PaddleSlim Docs</a>
157
      </nav>
158

159 160 161 162 163 164 165 166 167
      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href=".">Docs</a> &raquo;</li>
    
      
    
168
    <li>Home</li>
169 170
    <li class="wy-breadcrumbs-aside">
      
171
        <a href="https://github.com/PaddlePaddle/PaddleSlim/blob/develop/docs/docs/index.md"
172 173
          class="icon icon-github"> Edit on GitHub</a>
      
174 175 176 177 178 179 180
    </li>
  </ul>
  <hr/>
</div>
          <div role="main">
            <div class="section">
              
181
                <h1 id="paddleslim">PaddleSlim<a class="headerlink" href="#paddleslim" title="Permanent link">#</a></h1>
182 183
<p>PaddleSlim是PaddlePaddle框架的一个子模块,主要用于压缩图像领域模型。在PaddleSlim中,不仅实现了目前主流的网络剪枝、量化、蒸馏三种压缩策略,还实现了超参数搜索和小模型网络结构搜索功能。在后续版本中,会添加更多的压缩策略,以及完善对NLP领域模型的支持。</p>
<h2 id="_1">功能<a class="headerlink" href="#_1" title="Permanent link">#</a></h2>
184
<ul>
185 186
<li>模型剪裁</li>
<li>支持通道均匀模型剪裁(uniform pruning)</li>
187
<li>基于敏感度的模型剪裁</li>
188 189
<li>
<p>基于进化算法的自动模型剪裁三种方式</p>
190 191 192 193
</li>
<li>
<p>量化训练</p>
</li>
194 195
<li>在线量化训练(training aware)</li>
<li>离线量化(post training)</li>
196
<li>
197 198 199 200
<p>支持对权重全局量化和Channel-Wise量化</p>
</li>
<li>
<p>蒸馏</p>
201 202 203
</li>
<li>
<p>轻量神经网络结构自动搜索(Light-NAS)</p>
204
</li>
205 206 207
<li>支持基于进化算法的轻量神经网络结构自动搜索(Light-NAS)</li>
<li>支持 FLOPS / 硬件延时约束</li>
<li>支持多平台模型延时评估</li>
208
</ul>
209
<h2 id="_2">安装<a class="headerlink" href="#_2" title="Permanent link">#</a></h2>
210 211 212 213
<p>安装PaddleSlim前,请确认已正确安装Paddle1.6版本或更新版本。Paddle安装请参考:<a href="https://www.paddlepaddle.org.cn/install/quick">Paddle安装教程</a></p>
<ul>
<li>安装develop版本</li>
</ul>
214 215 216
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
2
3</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">PaddlePaddle</span><span class="o">/</span><span class="n">PaddleSlim</span><span class="p">.</span><span class="n">git</span>
217 218 219
<span class="n">cd</span> <span class="n">PaddleSlim</span>
<span class="n">python</span> <span class="n">setup</span><span class="p">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
220
</td></tr></table>
221 222 223 224

<ul>
<li>安装官方发布的最新版本</li>
</ul>
225
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">paddleslim</span> <span class="o">-</span><span class="n">i</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">pypi</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="k">simple</span>
226
</pre></div>
227
</td></tr></table>
228 229 230 231 232

<ul>
<li>安装历史版本</li>
</ul>
<p>请点击<a href="https://pypi.org/project/paddleslim/#history">pypi.org</a>查看可安装历史版本。</p>
233
<h2 id="_3">使用<a class="headerlink" href="#_3" title="Permanent link">#</a></h2>
234
<ul>
235 236 237 238 239 240
<li><a href="doc/api_guide.md">API文档</a>:API使用介绍,包括<a href="">蒸馏</a><a href="">剪裁</a><a href="">量化</a><a href="">模型结构搜索</a></li>
<li><a href="doc/demo_guide.md">示例</a>:基于mnist和cifar10等简单分类任务的模型压缩示例,您可以通过该部分快速体验和了解PaddleSlim的功能。</li>
<li><a href="">实践教程</a>:经典模型的分析和压缩实验教程。</li>
<li><a href="">模型库</a>:经过压缩的分类、检测、语义分割模型,包括权重文件、网络结构文件和性能数据。</li>
<li><a href="">Paddle检测库</a>:介绍如何在检测库中使用PaddleSlim。</li>
<li><a href="">Paddle分割库</a>:介绍如何在分割库中使用PaddleSlim。</li>
241 242
<li><a href="">PaddleLite</a>:介绍如何使用预测库PaddleLite部署PaddleSlim产出的模型。</li>
</ul>
243
<h2 id="_4">贡献与反馈<a class="headerlink" href="#_4" title="Permanent link">#</a></h2>
244
              
245
            </div>
246 247 248 249 250
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
251
        <a href="model_zoo/" class="btn btn-neutral float-right" title="模型库">Next <span class="icon icon-circle-arrow-right"></span></a>
252 253
      
      
254
    </div>
255 256 257 258 259 260 261 262 263 264 265 266
  

  <hr/>

  <div role="contentinfo">
    <!-- Copyright etc -->
    
  </div>

  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
      
267
        </div>
268 269 270 271 272 273 274 275 276
      </div>

    </section>

  </div>

  <div class="rst-versions" role="note" style="cursor: pointer">
    <span class="rst-current-version" data-toggle="rst-current-version">
      
277 278
          <a href="https://github.com/PaddlePaddle/PaddleSlim/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
      
279 280
      
      
281
        <span style="margin-left: 15px"><a href="model_zoo/" style="color: #fcfcfc">Next &raquo;</a></span>
282 283
      
    </span>
284
</div>
285 286
    <script>var base_url = '.';</script>
    <script src="js/theme.js" defer></script>
287
      <script src="mathjax-config.js" defer></script>
288
      <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
289
      <script src="search/main.js" defer></script>
290

291
</body>
292 293 294 295
</html>

<!--
MkDocs version : 1.0.4
296
Build Date UTC : 2020-01-09 05:24:41
297
-->