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

156
    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
157

158 159 160
      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
161
        <a href=".">PaddleSlim Docs</a>
162
      </nav>
163

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

<ul>
<li>安装官方发布的最新版本</li>
</ul>
230
<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>
231
</pre></div>
232
</td></tr></table>
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248

<ul>
<li>安装历史版本</li>
</ul>
<p>请点击<a href="https://pypi.org/project/paddleslim/#history">pypi.org</a>查看可安装历史版本。</p>
<h2 id="_3">使用<a class="headerlink" href="#_3" title="Permanent link">#</a></h2>
<ul>
<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>
<li><a href="">PaddleLite</a>:介绍如何使用预测库PaddleLite部署PaddleSlim产出的模型。</li>
</ul>
<h2 id="_4">贡献与反馈<a class="headerlink" href="#_4" title="Permanent link">#</a></h2>
249
              
250
            </div>
251 252 253 254 255
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
256
        <a href="api/quantization_api/" class="btn btn-neutral float-right" title="量化">Next <span class="icon icon-circle-arrow-right"></span></a>
257 258
      
      
259
    </div>
260 261 262 263 264 265 266 267 268 269 270 271
  

  <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>
      
272
        </div>
273 274 275 276 277 278 279 280 281
      </div>

    </section>

  </div>

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

296
</body>
297 298 299 300
</html>

<!--
MkDocs version : 1.0.4
301
Build Date UTC : 2020-01-03 03:53:47
302
-->