index.html 7.5 KB
Newer Older
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
<!DOCTYPE html>
<!--[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">
  
  
  <link rel="shortcut icon" href="../../img/favicon.ico">
  <title>Demo guide - PaddleSlim Docs</title>
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>

  <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
    var mkdocs_page_name = "Demo guide";
    var mkdocs_page_input_path = "tutorials/demo_guide.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>

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

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

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
      <div class="wy-side-nav-search">
        <a href="../.." class="icon icon-home"> PaddleSlim Docs</a>
        <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>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
	<ul class="current">
	  
          
            <li class="toctree-l1">
		
    <a class="" href="../..">Home</a>
	    </li>
          
            <li class="toctree-l1">
		
58 59 60 61 62
    <a class="" href="../../model_zoo/">模型库</a>
	    </li>
          
            <li class="toctree-l1">
		
63
    <span class="caption-text">教程</span>
64 65 66
    <ul class="subnav">
                <li class="">
                    
67
    <a class="" href="../quant_post_demo/">离线量化</a>
68 69 70
                </li>
                <li class="">
                    
71
    <a class="" href="../quant_aware_demo/">量化训练</a>
72
                </li>
73 74
                <li class="">
                    
75
    <a class="" href="../quant_embedding_demo/">Embedding量化</a>
76
                </li>
77 78
                <li class="">
                    
79
    <a class="" href="../nas_demo/">SA搜索</a>
80 81 82
                </li>
                <li class="">
                    
83
    <a class="" href="../distillation_demo/">知识蒸馏</a>
84
                </li>
85 86 87 88 89
    </ul>
	    </li>
          
            <li class="toctree-l1">
		
90
    <span class="caption-text">API</span>
91
    <ul class="subnav">
92 93
                <li class="">
                    
94
    <a class="" href="../../api/quantization_api/">量化</a>
95 96 97
                </li>
                <li class="">
                    
98
    <a class="" href="../../api/prune_api/">剪枝与敏感度</a>
99 100 101
                </li>
                <li class="">
                    
102
    <a class="" href="../../api/analysis_api/">模型分析</a>
103 104 105
                </li>
                <li class="">
                    
106
    <a class="" href="../../api/single_distiller_api/">知识蒸馏</a>
107
                </li>
108 109
                <li class="">
                    
110 111 112 113 114 115 116 117 118
    <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>
119
                </li>
120 121 122
    </ul>
	    </li>
          
123 124 125 126 127
            <li class="toctree-l1">
		
    <a class="" href="../../algo/algo/">算法原理</a>
	    </li>
          
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
        </ul>
      </div>
      &nbsp;
    </nav>

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

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

      
      <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>
    
      
    
    <li>Demo guide</li>
    <li class="wy-breadcrumbs-aside">
      
        <a href="https://github.com/PaddlePaddle/PaddleSlim/edit/master/docs/tutorials/demo_guide.md"
          class="icon icon-github"> Edit on GitHub</a>
      
    </li>
  </ul>
  <hr/>
</div>
          <div role="main">
            <div class="section">
              
                <h2 id="_1"><a href="../demo/distillation/distillation_demo.py">蒸馏</a><a class="headerlink" href="#_1" title="Permanent link">#</a></h2>
<p>蒸馏demo默认使用ResNet50作为teacher网络,MobileNet作为student网络,此外还支持将teacher和student换成<a href="../demo/models">models目录</a>支持的任意模型。</p>
<p>demo中对teahcer模型和student模型的一层特征图添加了l2_loss的蒸馏损失函数,使用时也可根据需要选择fsp_loss, soft_label_loss以及自定义的loss函数。</p>
<p>训练默认使用的是cifar10数据集,piecewise_decay学习率衰减策略,momentum优化器进行120轮蒸馏训练。使用者也可以简单地用args参数切换为使用ImageNet数据集,cosine_decay学习率衰减策略等其他训练配置。</p>
<h2 id="_2">量化<a class="headerlink" href="#_2" title="Permanent link">#</a></h2>
<h3 id="demo"><a href="../quant_aware_demo/">量化训练demo文档</a><a class="headerlink" href="#demo" title="Permanent link">#</a></h3>
<h3 id="demo_1"><a href="../quant_post_demo/">离线量化demo文档</a><a class="headerlink" href="#demo_1" title="Permanent link">#</a></h3>
<h3 id="embeddingdemo"><a href="../quant_embedding_demo/">Embedding量化demo文档</a><a class="headerlink" href="#embeddingdemo" title="Permanent link">#</a></h3>
<h2 id="nas">NAS<a class="headerlink" href="#nas" title="Permanent link">#</a></h2>
<h3 id="nas_1"><a href="../nas_demo/">NAS示例</a><a class="headerlink" href="#nas_1" title="Permanent link">#</a></h3>
              
            </div>
          </div>
          <footer>
  

  <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>
      
        </div>
      </div>

    </section>

  </div>

  <div class="rst-versions" role="note" style="cursor: pointer">
    <span class="rst-current-version" data-toggle="rst-current-version">
      
          <a href="https://github.com/PaddlePaddle/PaddleSlim/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
      
      
      
    </span>
</div>
    <script>var base_url = '../..';</script>
    <script src="../../js/theme.js" defer></script>
      <script src="../../mathjax-config.js" defer></script>
208
      <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
209 210 211 212
      <script src="../../search/main.js" defer></script>

</body>
</html>