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 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 77 78 79 80
    <a class="" href="model_zoo/">模型库</a>
	    </li>
          
            <li class="toctree-l1">
		
81
    <span class="caption-text">API</span>
82 83 84
    <ul class="subnav">
                <li class="">
                    
85
    <a class="" href="api/quantization_api/">量化</a>
86 87 88
                </li>
                <li class="">
                    
89
    <a class="" href="api/prune_api/">剪枝与敏感度</a>
90 91 92
                </li>
                <li class="">
                    
93
    <a class="" href="api/analysis_api/">模型分析</a>
94
                </li>
95
                <li class="">
96
                    
97
    <a class="" href="api/single_distiller_api/">知识蒸馏</a>
98
                </li>
99 100
                <li class="">
                    
101
    <a class="" href="api/nas_api/">SA搜索</a>
102
                </li>
103
                <li class="">
104
                    
105
    <a class="" href="api/search_space/">搜索空间</a>
106
                </li>
107
                <li class="">
108
                    
109
    <a class="" href="table_latency/">硬件延时评估表</a>
110
                </li>
111 112 113 114 115 116 117
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
    <span class="caption-text">教程</span>
    <ul class="subnav">
118
                <li class="">
119
                    
120
    <a class="" href="tutorials/quant_post_demo/">离线量化</a>
121
                </li>
122
                <li class="">
123
                    
124
    <a class="" href="tutorials/quant_aware_demo/">量化训练</a>
125
                </li>
126
                <li class="">
127
                    
128
    <a class="" href="tutorials/quant_embedding_demo/">Embedding量化</a>
129
                </li>
130 131
                <li class="">
                    
132
    <a class="" href="tutorials/nas_demo/">SA搜索</a>
133
                </li>
134 135
                <li class="">
                    
136
    <a class="" href="tutorials/distillation_demo/">知识蒸馏</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 172 173
        <a href="https://github.com/PaddlePaddle/PaddleSlim/edit/master/docs/index.md"
          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 182 183 184
                <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>
185
<li>模型剪裁</li>
186 187
<li>支持通道均匀模型剪裁(uniform pruning)</li>
<li>基于敏感度的模型剪裁</li>
188 189
<li>
<p>基于进化算法的自动模型剪裁三种方式</p>
190 191 192
</li>
<li>
<p>量化训练</p>
193
</li>
194 195
<li>在线量化训练(training aware)</li>
<li>离线量化(post training)</li>
196 197
<li>
<p>支持对权重全局量化和Channel-Wise量化</p>
198 199
</li>
<li>
200
<p>蒸馏</p>
201 202 203
</li>
<li>
<p>轻量神经网络结构自动搜索(Light-NAS)</p>
204
</li>
205 206 207 208 209 210 211 212 213
<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>
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 233 234 235 236 237 238 239 240 241 242 243

<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>
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-07 07:51:02
297
-->